The playercreateinfo_action data is quite old, and in some cases is missing data. Additionally much of the data is duplicated.
First off, a core change to allow us to use 0 values for race or class to define all for playercreateinfo_action (This will allow us to use far less MySQL data to define these values):
diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp
old mode 100644
new mode 100755
index 891bc9b…6c1a2e9
— a/src/server/game/Globals/ObjectMgr.cpp
+++ b/src/server/game/Globals/ObjectMgr.cpp
@@ -3233,8 +3233,24 @@ void ObjectMgr::LoadPlayerInfo()
continue;
}
-
if (PlayerInfo* info = _playerInfo[current_race][current_class])
-
if (!current_race || !current_class)
-
{
-
uint32 min_race = current_race ? current_race : 1;
-
uint32 max_race = current_race ? current_race + 1 : MAX_RACES;
-
uint32 min_class = current_class ? current_class : 1;
-
uint32 max_class = current_class ? current_class + 1 : MAX_CLASSES;
-
for (uint32 r = min_race; r < max_race; ++r)
-
for (uint32 c = min_class; c < max_class; ++c)
-
if (PlayerInfo* info = _playerInfo[r][c])
-
info->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16()));
-
}
-
else if (PlayerInfo* info = _playerInfo[current_race][current_class]) info->action.push_back(PlayerCreateInfoAction(fields[2].GetUInt16(), fields[3].GetUInt32(), fields[4].GetUInt16()));
-
else
-
{
-
sLog->outError(LOG_FILTER_SQL, "Wrong race: %u, class: %u combination in `playercreateinfo_action` table, ignoring.", current_race, current_class);
-
continue;
-
} ++count; }
The playercreateinfo_action data:
– Class Spells
SET @RACE := 0;
DELETE FROM playercreateinfo_action
;
– Class Skills
– Warrior
SET @CLASS := 1;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,78,0), – Heroic Strike
(@RACE,@CLASS,72,6603,0), – Auto Attack (Stance)
(@RACE,@CLASS,73,78,0), – Heroic Strike (Stance)
(@RACE,@CLASS,84,6603,0), – Auto Attack (Stance)
(@RACE,@CLASS,85,78,0), – Heroic Strike (Stance)
(@RACE,@CLASS,96,6603,0), – Auto Attack (Stance)
(@RACE,@CLASS,97,78,0), – Heroic Strike (Stance)
(@RACE,@CLASS,108,6603,0), – Auto Attack (Stance)
(@RACE,@CLASS,109,78,0); – Heroic Strike (Stance)
– Paladin
SET @CLASS := 2;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,21084,0), – Seal of Righteousness
(@RACE,@CLASS,2,635,0); – Holy Light
– Hunter
SET @CLASS := 3;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,2973,0), – Raptor Strike
(@RACE,@CLASS,2,75,0); – Auto Shot
– Rogue
SET @CLASS := 4;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,1752,0), – Sinister Strike
(@RACE,@CLASS,2,2098,0), – Eviscerate
(@RACE,@CLASS,3,2764,0); – Throw
– Priest
SET @CLASS := 5;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,585,0), – Smite
(@RACE,@CLASS,2,2050,0); – Lesser Heal
– Death Knight
SET @CLASS := 6;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,45462,0), – Plague Strike
(@RACE,@CLASS,2,45477,0), – Icy Touch
(@RACE,@CLASS,3,45902,0), – Blood Strike
(@RACE,@CLASS,4,47541,0), – Death Coil
(@RACE,@CLASS,5,49576,0); – Death Grip
– Shaman
SET @CLASS := 7;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,403,0), – Lightning Bolt
(@RACE,@CLASS,2,331,0); – Healing Wave
– Mage
SET @CLASS := 8;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,133,0), – Fireball
(@RACE,@CLASS,2,168,0); – Frost Armor
– Warlock
SET @CLASS := 9;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,686,0), – Shadow Bolt
(@RACE,@CLASS,2,687,0); – Demon Skin
– Druid
SET @CLASS := 11;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,1,5176,0), – Wrath
(@RACE,@CLASS,2,5185,0); – Healing Touch
– Racial Spells
SET @CLASS := 0;
– Human
SET @RACE := 1;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,11,59752,0); – Every Man for Himself
– Orc
SET @RACE := 2;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,1,11,20572,0), – Blood Fury
(@RACE,3,11,20572,0), – Blood Fury
(@RACE,4,11,20572,0), – Blood Fury
(@RACE,6,11,20572,0), – Blood Fury
(@RACE,7,11,33697,0), – Blood Fury
(@RACE,8,11,33702,0), – Blood Fury
(@RACE,9,11,33702,0); – Blood Fury
– Dwarf
SET @RACE := 3;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,10,2481,0), – Find Treasure
(@RACE,@CLASS,11,20594,0); – Stoneform
– Night Elf
SET @RACE := 4;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,11,58984,0); – Shadowmeld
– Forsaken
SET @RACE := 5;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,11,7744,0), – Will of the Forsaken
(@RACE,@CLASS,10,20577,0); – Cannibalize
– Tauren
SET @RACE := 6;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,11,20549,0); – War Stomp
– Gnome
SET @RACE := 7;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,11,20589,0); – Escape Artist
– Troll
SET @RACE := 8;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,@CLASS,11,26297,0), – Berserking
(@RACE,1,2,2764,0); – Throw
– Blood Elf
SET @RACE := 10;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,2,11,28730,0), – Arcane Torrent
(@RACE,3,11,28730,0), – Arcane Torrent
(@RACE,4,11,25046,0), – Arcane Torrent
(@RACE,5,11,28730,0), – Arcane Torrent
(@RACE,6,11,50613,0), – Arcane Torrent
(@RACE,8,11,28730,0), – Arcane Torrent
(@RACE,9,11,28730,0); – Arcane Torrent
– Draenei
SET @RACE := 11;
INSERT INTO playercreateinfo_action
(race
,class
,button
,action
,type
) VALUES
(@RACE,1,11,28880,0), – Gift of the Naaru
(@RACE,2,11,59542,0), – Gift of the Naaru
(@RACE,3,11,59543,0), – Gift of the Naaru
(@RACE,5,11,59544,0), – Gift of the Naaru
(@RACE,6,11,59545,0), – Gift of the Naaru
(@RACE,7,11,59547,0), – Gift of the Naaru
(@RACE,8,11,59548,0); – Gift of the Naaru
The playercreateinfo_action table would be cut from over 300 columns to under 100 and be more accurate.