mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-31 06:07:37 +01:00
Core/Loading: Fix CreatureLoadTemplates and add missing fields to WORLD_SEL_CREATURE_TEMPLATE
This commit is contained in:
@@ -429,11 +429,12 @@ public:
|
||||
|
||||
Field* fields = result->Fetch();
|
||||
|
||||
cInfo->DifficultyEntry[0] = fields[0].GetUInt32();
|
||||
cInfo->DifficultyEntry[1] = fields[1].GetUInt32();
|
||||
cInfo->DifficultyEntry[2] = fields[2].GetUInt32();
|
||||
cInfo->KillCredit[0] = fields[3].GetUInt32();
|
||||
cInfo->KillCredit[1] = fields[4].GetUInt32();
|
||||
for (uint8 i = 0; i < MAX_DIFFICULTY - 1; ++i)
|
||||
cInfo.DifficultyEntry[i] = fields[0 + i].GetUInt32();
|
||||
|
||||
for (uint8 i = 0; i < MAX_KILL_CREDIT; ++i)
|
||||
cInfo.KillCredit[i] = fields[3 + i].GetUInt32();
|
||||
|
||||
cInfo->Modelid1 = fields[5].GetUInt32();
|
||||
cInfo->Modelid2 = fields[6].GetUInt32();
|
||||
cInfo->Modelid3 = fields[7].GetUInt32();
|
||||
@@ -445,72 +446,67 @@ public:
|
||||
cInfo->minlevel = fields[13].GetUInt8();
|
||||
cInfo->maxlevel = fields[14].GetUInt8();
|
||||
cInfo->expansion = fields[15].GetUInt16();
|
||||
cInfo->faction_A = fields[16].GetUInt16();
|
||||
cInfo->faction_H = fields[17].GetUInt16();
|
||||
cInfo->npcflag = fields[18].GetUInt32();
|
||||
cInfo->speed_walk = fields[19].GetFloat();
|
||||
cInfo->speed_run = fields[20].GetFloat();
|
||||
cInfo->scale = fields[21].GetFloat();
|
||||
cInfo->rank = fields[22].GetUInt8();
|
||||
cInfo->mindmg = fields[23].GetFloat();
|
||||
cInfo->maxdmg = fields[24].GetFloat();
|
||||
cInfo->dmgschool = fields[25].GetUInt8();
|
||||
cInfo->attackpower = fields[26].GetUInt32();
|
||||
cInfo->dmg_multiplier = fields[27].GetFloat();
|
||||
cInfo->baseattacktime = fields[28].GetUInt32();
|
||||
cInfo->rangeattacktime = fields[29].GetUInt32();
|
||||
cInfo->unit_class = fields[30].GetUInt8();
|
||||
cInfo->unit_flags = fields[31].GetUInt32();
|
||||
cInfo->unit_flags2 = fields[32].GetUInt32();
|
||||
cInfo->dynamicflags = fields[33].GetUInt32();
|
||||
cInfo->family = fields[34].GetUInt8();
|
||||
cInfo->trainer_type = fields[35].GetUInt8();
|
||||
cInfo->trainer_class = fields[36].GetUInt8();
|
||||
cInfo->trainer_race = fields[37].GetUInt8();
|
||||
cInfo->minrangedmg = fields[38].GetFloat();
|
||||
cInfo->maxrangedmg = fields[39].GetFloat();
|
||||
cInfo->rangedattackpower = fields[40].GetUInt16();
|
||||
cInfo->type = fields[41].GetUInt8();
|
||||
cInfo->type_flags = fields[42].GetUInt32();
|
||||
cInfo->lootid = fields[43].GetUInt32();
|
||||
cInfo->pickpocketLootId = fields[44].GetUInt32();
|
||||
cInfo->SkinLootId = fields[45].GetUInt32();
|
||||
cInfo->expansionUnknown = fields[16].GetUInt16();
|
||||
cInfo->faction_A = fields[17].GetUInt16();
|
||||
cInfo->faction_H = fields[18].GetUInt16();
|
||||
cInfo->npcflag = fields[19].GetUInt32();
|
||||
cInfo->speed_walk = fields[20].GetFloat();
|
||||
cInfo->speed_run = fields[21].GetFloat();
|
||||
cInfo->scale = fields[22].GetFloat();
|
||||
cInfo->rank = fields[23].GetUInt8();
|
||||
cInfo->mindmg = fields[24].GetFloat();
|
||||
cInfo->maxdmg = fields[25].GetFloat();
|
||||
cInfo->dmgschool = fields[26].GetUInt8();
|
||||
cInfo->attackpower = fields[27].GetUInt32();
|
||||
cInfo->dmg_multiplier = fields[28].GetFloat();
|
||||
cInfo->baseattacktime = fields[29].GetUInt32();
|
||||
cInfo->rangeattacktime = fields[30].GetUInt32();
|
||||
cInfo->unit_class = fields[31].GetUInt8();
|
||||
cInfo->unit_flags = fields[32].GetUInt32();
|
||||
cInfo->unit_flags2 = fields[33].GetUInt32();
|
||||
cInfo->dynamicflags = fields[34].GetUInt32();
|
||||
cInfo->family = fields[35].GetUInt8();
|
||||
cInfo->trainer_type = fields[36].GetUInt8();
|
||||
cInfo->trainer_class = fields[37].GetUInt8();
|
||||
cInfo->trainer_race = fields[38].GetUInt8();
|
||||
cInfo->minrangedmg = fields[39].GetFloat();
|
||||
cInfo->maxrangedmg = fields[40].GetFloat();
|
||||
cInfo->rangedattackpower = fields[41].GetUInt16();
|
||||
cInfo->type = fields[42].GetUInt8();
|
||||
cInfo->type_flags = fields[43].GetUInt32();
|
||||
cInfo->type_flags2 = fields[44].GetUInt32();
|
||||
cInfo->lootid = fields[45].GetUInt32();
|
||||
cInfo->pickpocketLootId = fields[46].GetUInt32();
|
||||
cInfo->SkinLootId = fields[47].GetUInt32();
|
||||
|
||||
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
|
||||
cInfo->resistance[i] = fields[46 + i -1].GetUInt16();
|
||||
cInfo->resistance[i] = fields[48 + i -1].GetUInt16();
|
||||
|
||||
cInfo->spells[0] = fields[52].GetUInt32();
|
||||
cInfo->spells[1] = fields[53].GetUInt32();
|
||||
cInfo->spells[2] = fields[54].GetUInt32();
|
||||
cInfo->spells[3] = fields[55].GetUInt32();
|
||||
cInfo->spells[4] = fields[56].GetUInt32();
|
||||
cInfo->spells[5] = fields[57].GetUInt32();
|
||||
cInfo->spells[6] = fields[58].GetUInt32();
|
||||
cInfo->spells[7] = fields[59].GetUInt32();
|
||||
cInfo->PetSpellDataId = fields[60].GetUInt32();
|
||||
cInfo->VehicleId = fields[61].GetUInt32();
|
||||
cInfo->mingold = fields[62].GetUInt32();
|
||||
cInfo->maxgold = fields[63].GetUInt32();
|
||||
cInfo->AIName = fields[64].GetString();
|
||||
cInfo->MovementType = fields[65].GetUInt8();
|
||||
cInfo->InhabitType = fields[66].GetUInt8();
|
||||
cInfo->HoverHeight = fields[67].GetFloat();
|
||||
cInfo->ModHealth = fields[68].GetFloat();
|
||||
cInfo->ModMana = fields[69].GetFloat();
|
||||
cInfo->ModManaExtra = fields[70].GetFloat();
|
||||
cInfo->ModArmor = fields[71].GetFloat();
|
||||
cInfo->RacialLeader = fields[72].GetBool();
|
||||
cInfo->questItems[0] = fields[73].GetUInt32();
|
||||
cInfo->questItems[1] = fields[74].GetUInt32();
|
||||
cInfo->questItems[2] = fields[75].GetUInt32();
|
||||
cInfo->questItems[3] = fields[76].GetUInt32();
|
||||
cInfo->questItems[4] = fields[77].GetUInt32();
|
||||
cInfo->questItems[5] = fields[78].GetUInt32();
|
||||
cInfo->movementId = fields[79].GetUInt32();
|
||||
cInfo->RegenHealth = fields[80].GetBool();
|
||||
cInfo->MechanicImmuneMask = fields[81].GetUInt32();
|
||||
cInfo->flags_extra = fields[82].GetUInt32();
|
||||
cInfo->ScriptID = sObjectMgr->GetScriptId(fields[83].GetCString());
|
||||
for (uint8 i = 0; i < CREATURE_MAX_SPELLS; ++i)
|
||||
cInfo.spells[i] = fields[54 + i].GetUInt32();
|
||||
|
||||
cInfo->PetSpellDataId = fields[62].GetUInt32();
|
||||
cInfo->VehicleId = fields[63].GetUInt32();
|
||||
cInfo->mingold = fields[64].GetUInt32();
|
||||
cInfo->maxgold = fields[65].GetUInt32();
|
||||
cInfo->AIName = fields[66].GetString();
|
||||
cInfo->MovementType = fields[67].GetUInt8();
|
||||
cInfo->InhabitType = fields[68].GetUInt8();
|
||||
cInfo->HoverHeight = fields[69].GetFloat();
|
||||
cInfo->ModHealth = fields[70].GetFloat();
|
||||
cInfo->ModMana = fields[71].GetFloat();
|
||||
cInfo->ModManaExtra = fields[72].GetFloat();
|
||||
cInfo->ModArmor = fields[73].GetFloat();
|
||||
cInfo->RacialLeader = fields[74].GetBool();
|
||||
|
||||
for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i)
|
||||
cInfo.questItems[i] = fields[75 + i].GetUInt32();
|
||||
|
||||
cInfo->movementId = fields[81].GetUInt32();
|
||||
cInfo->RegenHealth = fields[82].GetBool();
|
||||
cInfo->MechanicImmuneMask = fields[83].GetUInt32();
|
||||
cInfo->flags_extra = fields[84].GetUInt32();
|
||||
cInfo->ScriptID = sObjectMgr->GetScriptId(fields[85].GetCString());
|
||||
|
||||
sObjectMgr->CheckCreatureTemplate(cInfo);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user