Modcraft - The community dedicated to quality WoW modding!

Wrath of the Lich King Modding => Serverside Modding => Topic started by: Moridhin on March 06, 2013, 01:24:02 pm

Title: [QUESTION] problem with custom races
Post by: Moridhin on March 06, 2013, 01:24:02 pm
Ok here is the thing:
-I did client part of adding custom races(i added 2),they show up without errors in character creation screen.
-I did core edit of SharedDefines.h and compiled without problems.
-I added into database query's using tool races by Khanx.
BUT when i try to create new character with those new races i get in my world console this error:

Player::Create: Possible hacking-attempt: Account 1 tried creating a character named 'Adsdas' with an invalid race/class pair (14/1) - refusing to do so.

Any ideas how to solve this?
Title: Re: [QUESTION] problem with custom races
Post by: stan84 on March 06, 2013, 02:51:07 pm
it seems u have not add propper entries for classs 1 race 14 in CharBaseInfo.dbc,also check again in your sql.
Title: Re: [QUESTION] problem with custom races
Post by: Moridhin on March 06, 2013, 03:39:31 pm
Think .dbc file is ok,but i uploaded it if anyone can check if its ok.
However about sql i am not sure,i made it using that tool and reading that guide about making races.
So maybe thats the problem,anyway here it is:
Code: [Select]
SET @NEW_RACE = '14';
SET @NEW_CLASS = '1';
SET @COPY_RACE = '1';

DELETE FROM `playercreateinfo_spell` WHERE race = @NEW_RACE AND class = @NEW_CLASS ;
INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`)SELECT @NEW_RACE, @NEW_CLASS, `Spell`, `Note` FROM `playercreateinfo_spell` WHERE race = @COPY_RACE AND class = @NEW_CLASS;

DELETE FROM `playercreateinfo_action` WHERE race = @NEW_RACE AND class = @NEW_CLASS ;
INSERT INTO `playercreateinfo_action` (`race`, `class`, `button`, `action`, `type`)SELECT @NEW_RACE, @NEW_CLASS, `button`, `action`, `type` FROM `playercreateinfo_action` WHERE race = @COPY_RACE AND class = @NEW_CLASS;

DELETE FROM `player_levelstats` WHERE race = @NEW_RACE AND class = @NEW_CLASS ;
INSERT INTO `player_levelstats` (`race`, `class`, `level`, `str`, `agi`, `sta`, `inte`, `spi`)SELECT @NEW_RACE, @NEW_CLASS, `level`, `str`, `agi`, `sta`, `inte`, `spi` FROM `player_levelstats` WHERE race = @COPY_RACE AND class = @NEW_CLASS;

DELETE FROM `playercreateinfo_spell` WHERE (race=@NEW_RACE) AND (class=@NEW_CLASS) AND ((spell='668')OR(spell='671')OR(spell='814')OR(spell='29932')OR(spell='672')OR(spell='7340')OR(spell='669')OR(spell='670')OR(spell='813')OR(spell='816')OR(spell='7341')OR(spell='17737')OR(spell='69269')OR(spell='69270'));
INSERT INTO `playercreateinfo_spell` (`race`, `class`, `Spell`, `Note`) VALUES (@NEW_RACE, @NEW_CLASS, '669', 'Language Orcish');
Title: Re: [QUESTION] problem with custom races
Post by: Zim4ik on March 06, 2013, 03:55:54 pm
you dont have data for your new races in "playercreateinfo" table
Title: Re: [QUESTION] problem with custom races
Post by: Moridhin on March 06, 2013, 05:21:45 pm
added it into playercreateinfo,but same error.
Anyone has any ideas?