 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
 
 # Dumping structure for procedure galaxy.sp_CharacterCreate
+DROP PROCEDURE IF EXISTS `sp_CharacterCreate`;
 DELIMITER //
 CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_CharacterCreate`(IN `start_account_id` INT, IN `start_galaxy_id` INT, IN `start_firstname` char(32), IN `start_lastname` char(32), IN `start_custom_name` char(50), IN `start_profession` char(64), IN `start_city` char(32), IN `start_scale` FLOAT, IN `start_biography` text(2048), IN `start_appearance_customization` TINYBLOB, IN `start_hair_model` CHAR(64), IN `hair_customization` TEXT(200), IN `base_model_string` CHAR(64))
 charCreate:BEGIN
 
   DECLARE oX FLOAT;DECLARE oY FLOAT;DECLARE oZ FLOAT;DECLARE oW FLOAT;
   DECLARE race_id INT;
+  DECLARE iff_template_id INT;
   DECLARE object_id BIGINT(20);
   DECLARE player_id BIGINT(20);
   DECLARE character_id BIGINT(20);


   SELECT scene_id, x, y, z FROM starting_location WHERE location LIKE 'coronet' INTO start_scene, start_x, start_y, start_z;

   SELECT sf_SpeciesShort(base_model_string) INTO shortSpecies;

   SELECT id from species where species.name like shortSpecies into race_id;

   INSERT INTO `object` VALUES (object_id, start_scene, parent_id, base_model_string, start_x,start_y,start_z,oX,oY,oZ,oW, 0, base_model_string, base_model_string, start_custom_name,0, NOW(), NOW(), null, 'player character');
   INSERT INTO `creature`(id, owner_id, bank_credits, cash_credits, posture, scale, acceleration_base, acceleration_modifier, speed_base, speed_modifier, run_speed, slope_modifier_angle, slope_modifier_percent, walking_speed) 
	VALUES (object_id, parent_id, 2000, 0, 0,start_scale, 1, 5, 1, 5, 10, 5, 5, 5 );
	INSERT INTO `player` (id, profession_tag, born_date, csr_tag, current_language, jedi_state)

# --------------------------------------------------------
# Host:                         127.0.0.1
# Server version:               5.3.2-MariaDB
# Server OS:                    Win32
# HeidiSQL version:             6.0.0.3603
# Date/time:                    2011-10-16 13:54:25
# --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
