aboutsummaryrefslogtreecommitdiff
path: root/src/server/scripts
diff options
context:
space:
mode:
authorKinzcool <kinzzcool@hotmail.com>2014-04-27 18:13:55 -0400
committerKinzcool <kinzzcool@hotmail.com>2014-04-27 18:13:55 -0400
commitc536305e3a3c4f41e94d14fae73ba7a2d8d13be2 (patch)
treecfbaa50362191e8a8edb11f7c360643730e3d688 /src/server/scripts
parenta1e8cad70351ead7e98707587a4fb68e79a364c8 (diff)
Core: Droped `faction_H` field -- only one faction table is necessary
Diffstat (limited to 'src/server/scripts')
-rw-r--r--src/server/scripts/Commands/cs_npc.cpp3
-rw-r--r--src/server/scripts/Commands/cs_reload.cpp127
-rw-r--r--src/server/scripts/Northrend/zone_zuldrak.cpp2
3 files changed, 65 insertions, 67 deletions
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp
index a5b13301403..5c9d5ee87ed 100644
--- a/src/server/scripts/Commands/cs_npc.cpp
+++ b/src/server/scripts/Commands/cs_npc.cpp
@@ -597,8 +597,7 @@ public:
// Update in memory..
if (CreatureTemplate const* cinfo = creature->GetCreatureTemplate())
{
- const_cast<CreatureTemplate*>(cinfo)->faction_A = factionId;
- const_cast<CreatureTemplate*>(cinfo)->faction_H = factionId;
+ const_cast<CreatureTemplate*>(cinfo)->faction = factionId;
}
// ..and DB
diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp
index 4de697f2597..89dc08d5737 100644
--- a/src/server/scripts/Commands/cs_reload.cpp
+++ b/src/server/scripts/Commands/cs_reload.cpp
@@ -456,72 +456,71 @@ 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_spell = fields[36].GetUInt32();
- 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->lootid = fields[44].GetUInt32();
- cInfo->pickpocketLootId = fields[45].GetUInt32();
- cInfo->SkinLootId = fields[46].GetUInt32();
+ cInfo->faction = fields[16].GetUInt16();
+ cInfo->npcflag = fields[17].GetUInt32();
+ cInfo->speed_walk = fields[18].GetFloat();
+ cInfo->speed_run = fields[19].GetFloat();
+ cInfo->scale = fields[20].GetFloat();
+ cInfo->rank = fields[21].GetUInt8();
+ cInfo->mindmg = fields[22].GetFloat();
+ cInfo->maxdmg = fields[23].GetFloat();
+ cInfo->dmgschool = fields[24].GetUInt8();
+ cInfo->attackpower = fields[25].GetUInt32();
+ cInfo->dmg_multiplier = fields[26].GetFloat();
+ cInfo->baseattacktime = fields[27].GetUInt32();
+ cInfo->rangeattacktime = fields[28].GetUInt32();
+ cInfo->unit_class = fields[29].GetUInt8();
+ cInfo->unit_flags = fields[30].GetUInt32();
+ cInfo->unit_flags2 = fields[31].GetUInt32();
+ cInfo->dynamicflags = fields[32].GetUInt32();
+ cInfo->family = fields[33].GetUInt8();
+ cInfo->trainer_type = fields[34].GetUInt8();
+ cInfo->trainer_spell = fields[35].GetUInt32();
+ 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();
for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
- cInfo->resistance[i] = fields[47 + i -1].GetUInt16();
-
- cInfo->spells[0] = fields[53].GetUInt32();
- cInfo->spells[1] = fields[54].GetUInt32();
- cInfo->spells[2] = fields[55].GetUInt32();
- cInfo->spells[3] = fields[56].GetUInt32();
- cInfo->spells[4] = fields[57].GetUInt32();
- cInfo->spells[5] = fields[58].GetUInt32();
- cInfo->spells[6] = fields[59].GetUInt32();
- cInfo->spells[7] = fields[60].GetUInt32();
- cInfo->PetSpellDataId = fields[61].GetUInt32();
- cInfo->VehicleId = fields[62].GetUInt32();
- cInfo->mingold = fields[63].GetUInt32();
- cInfo->maxgold = fields[64].GetUInt32();
- cInfo->AIName = fields[65].GetString();
- cInfo->MovementType = fields[66].GetUInt8();
- cInfo->InhabitType = fields[67].GetUInt8();
- cInfo->HoverHeight = fields[68].GetFloat();
- cInfo->ModHealth = fields[69].GetFloat();
- cInfo->ModMana = 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());
+ cInfo->resistance[i] = fields[46 + 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->ModArmor = fields[70].GetFloat();
+ cInfo->RacialLeader = fields[71].GetBool();
+ cInfo->questItems[0] = fields[72].GetUInt32();
+ cInfo->questItems[1] = fields[73].GetUInt32();
+ cInfo->questItems[2] = fields[74].GetUInt32();
+ cInfo->questItems[3] = fields[75].GetUInt32();
+ cInfo->questItems[4] = fields[76].GetUInt32();
+ cInfo->questItems[5] = fields[77].GetUInt32();
+ cInfo->movementId = fields[78].GetUInt32();
+ cInfo->RegenHealth = fields[79].GetBool();
+ cInfo->MechanicImmuneMask = fields[80].GetUInt32();
+ cInfo->flags_extra = fields[81].GetUInt32();
+ cInfo->ScriptID = sObjectMgr->GetScriptId(fields[82].GetCString());
sObjectMgr->CheckCreatureTemplate(cInfo);
}
diff --git a/src/server/scripts/Northrend/zone_zuldrak.cpp b/src/server/scripts/Northrend/zone_zuldrak.cpp
index 0f542b3aca7..fbf9a38512b 100644
--- a/src/server/scripts/Northrend/zone_zuldrak.cpp
+++ b/src/server/scripts/Northrend/zone_zuldrak.cpp
@@ -148,7 +148,7 @@ public:
me->RemoveAurasDueToSpell(SPELL_LEFT_CHAIN);
me->RemoveAurasDueToSpell(SPELL_RIGHT_CHAIN);
me->RemoveAurasDueToSpell(SPELL_KNEEL);
- me->setFaction(me->GetCreatureTemplate()->faction_H);
+ me->setFaction(me->GetCreatureTemplate()->faction);
DoCast(me, SPELL_UNSHACKLED, true);
Talk(SAY_RAGECLAW);
me->GetMotionMaster()->MoveRandom(10);