diff options
Diffstat (limited to 'src/server/scripts')
-rw-r--r-- | src/server/scripts/Commands/cs_npc.cpp | 8 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_reload.cpp | 105 | ||||
-rw-r--r-- | src/server/scripts/Northrend/zone_zuldrak.cpp | 2 |
3 files changed, 55 insertions, 60 deletions
diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 9bfa4f0334f..6fdc3b9f5ef 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -601,17 +601,13 @@ 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 PreparedStatement* stmt = WorldDatabase.GetPreparedStatement(WORLD_UPD_CREATURE_FACTION); stmt->setUInt16(0, uint16(factionId)); - stmt->setUInt16(1, uint16(factionId)); - stmt->setUInt32(2, creature->GetEntry()); + stmt->setUInt32(1, creature->GetEntry()); WorldDatabase.Execute(stmt); diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 2d4cb379536..0274de02ae0 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -456,66 +456,65 @@ public: cInfo->maxlevel = fields[14].GetUInt8(); cInfo->expansion = fields[15].GetUInt16(); 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(); + cInfo->faction = 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->type_flags2 = fields[43].GetUInt32(); + cInfo->lootid = fields[44].GetUInt32(); + cInfo->pickpocketLootId = fields[45].GetUInt32(); + cInfo->SkinLootId = fields[46].GetUInt32(); for (uint8 i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) - cInfo->resistance[i] = fields[48 + i -1].GetUInt16(); + cInfo->resistance[i] = fields[47 + i -1].GetUInt16(); 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(); + cInfo->spells[i] = fields[53 + i].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->ModManaExtra = fields[71].GetFloat(); + cInfo->ModArmor = fields[72].GetFloat(); + cInfo->RacialLeader = fields[73].GetBool(); for (uint8 i = 0; i < MAX_CREATURE_QUEST_ITEMS; ++i) - cInfo->questItems[i] = fields[75 + i].GetUInt32(); + cInfo->questItems[i] = fields[74 + 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()); + cInfo->movementId = fields[80].GetUInt32(); + cInfo->RegenHealth = fields[81].GetBool(); + cInfo->MechanicImmuneMask = fields[82].GetUInt32(); + cInfo->flags_extra = fields[83].GetUInt32(); + cInfo->ScriptID = sObjectMgr->GetScriptId(fields[84].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); |