Merge branch 'bfa'
This commit is contained in:
@@ -235,7 +235,7 @@ public:
|
||||
{
|
||||
player->GiveLevel(newLevel);
|
||||
player->InitTalentForLevel();
|
||||
player->SetUInt32Value(PLAYER_XP, 0);
|
||||
player->SetUInt32Value(ACTIVE_PLAYER_FIELD_XP, 0);
|
||||
|
||||
if (handler->needReportToTarget(player))
|
||||
{
|
||||
|
||||
@@ -276,9 +276,9 @@ public:
|
||||
for (uint16 i = 0; i < PLAYER_EXPLORED_ZONES_SIZE; ++i)
|
||||
{
|
||||
if (flag != 0)
|
||||
handler->GetSession()->GetPlayer()->SetFlag(PLAYER_EXPLORED_ZONES_1+i, 0xFFFFFFFF);
|
||||
handler->GetSession()->GetPlayer()->SetFlag(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + i, 0xFFFFFFFF);
|
||||
else
|
||||
handler->GetSession()->GetPlayer()->SetFlag(PLAYER_EXPLORED_ZONES_1+i, 0);
|
||||
handler->GetSession()->GetPlayer()->SetFlag(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + i, 0);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -985,7 +985,7 @@ public:
|
||||
|
||||
if (m)
|
||||
if (uint32 um = (uint32)atoi(m))
|
||||
phaseShift.AddUiWorldMapAreaIdSwap(um);
|
||||
phaseShift.AddUiMapPhaseId(um);
|
||||
|
||||
PhasingHandler::SendToPlayer(handler->GetSession()->GetPlayer(), phaseShift);
|
||||
return true;
|
||||
|
||||
@@ -658,7 +658,11 @@ public:
|
||||
}
|
||||
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(),
|
||||
handler->GetSession()->GetPlayer()->GetQuestLevel(qInfo),
|
||||
handler->GetSession()->GetPlayer()->GetQuestMinLevel(qInfo),
|
||||
qInfo->GetQuestMaxScalingLevel(), qInfo->GetQuestScalingFactionGroup(),
|
||||
title.c_str(), statusStr);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
|
||||
|
||||
@@ -706,7 +710,11 @@ public:
|
||||
}
|
||||
|
||||
if (handler->GetSession())
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(), qInfo->GetQuestLevel(), title.c_str(), statusStr);
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CHAT, qInfo->GetQuestId(), qInfo->GetQuestId(),
|
||||
handler->GetSession()->GetPlayer()->GetQuestLevel(qInfo),
|
||||
handler->GetSession()->GetPlayer()->GetQuestMinLevel(qInfo),
|
||||
qInfo->GetQuestMaxScalingLevel(), qInfo->GetQuestScalingFactionGroup(),
|
||||
title.c_str(), statusStr);
|
||||
else
|
||||
handler->PSendSysMessage(LANG_QUEST_LIST_CONSOLE, qInfo->GetQuestId(), title.c_str(), statusStr);
|
||||
|
||||
|
||||
@@ -1203,8 +1203,8 @@ public:
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area->AreaBit % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields | val)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset);
|
||||
playerTarget->SetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset, uint32((currFields | val)));
|
||||
|
||||
handler->SendSysMessage(LANG_EXPLORE_AREA);
|
||||
return true;
|
||||
@@ -1247,8 +1247,8 @@ public:
|
||||
}
|
||||
|
||||
uint32 val = uint32((1 << (area->AreaBit % 32)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset);
|
||||
playerTarget->SetUInt32Value(PLAYER_EXPLORED_ZONES_1 + offset, uint32((currFields ^ val)));
|
||||
uint32 currFields = playerTarget->GetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset);
|
||||
playerTarget->SetUInt32Value(ACTIVE_PLAYER_FIELD_EXPLORED_ZONES + offset, uint32((currFields ^ val)));
|
||||
|
||||
handler->SendSysMessage(LANG_UNEXPLORE_AREA);
|
||||
return true;
|
||||
|
||||
@@ -493,7 +493,10 @@ public:
|
||||
if (CheckModifySpeed(handler, args, target, Scale, 0.1f, 10.0f, false))
|
||||
{
|
||||
NotifyModification(handler, target, LANG_YOU_CHANGE_SIZE, LANG_YOURS_SIZE_CHANGED, Scale);
|
||||
target->SetObjectScale(Scale);
|
||||
if (Creature* creatureTarget = target->ToCreature())
|
||||
creatureTarget->SetFloatValue(UNIT_FIELD_DISPLAY_SCALE, Scale);
|
||||
else
|
||||
target->SetObjectScale(Scale);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
@@ -64,7 +64,7 @@ public:
|
||||
}
|
||||
|
||||
// .addquest #entry'
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hquest");
|
||||
if (!cId)
|
||||
return false;
|
||||
@@ -112,7 +112,7 @@ public:
|
||||
}
|
||||
|
||||
// .removequest #entry'
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hquest");
|
||||
if (!cId)
|
||||
return false;
|
||||
@@ -170,7 +170,7 @@ public:
|
||||
}
|
||||
|
||||
// .quest complete #entry
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hquest");
|
||||
if (!cId)
|
||||
return false;
|
||||
@@ -268,7 +268,7 @@ public:
|
||||
}
|
||||
|
||||
// .quest reward #entry
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level|h[name]|h|r
|
||||
// number or [name] Shift-click form |color|Hquest:quest_id:quest_level:min_level:max_level:scaling_faction|h[name]|h|r
|
||||
char* cId = handler->extractKeyFromLink((char*)args, "Hquest");
|
||||
if (!cId)
|
||||
return false;
|
||||
|
||||
@@ -83,8 +83,8 @@ public:
|
||||
if (!handler->extractPlayerTarget((char*)args, &target))
|
||||
return false;
|
||||
|
||||
target->SetUInt32Value(PLAYER_FIELD_KILLS, 0);
|
||||
target->SetUInt32Value(PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);
|
||||
target->SetUInt32Value(ACTIVE_PLAYER_FIELD_KILLS, 0);
|
||||
target->SetUInt32Value(ACTIVE_PLAYER_FIELD_LIFETIME_HONORABLE_KILLS, 0);
|
||||
target->UpdateCriteria(CRITERIA_TYPE_EARN_HONORABLE_KILL);
|
||||
|
||||
return true;
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
player->SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
|
||||
|
||||
//-1 is default value
|
||||
player->SetUInt32Value(PLAYER_FIELD_WATCHED_FACTION_INDEX, uint32(-1));
|
||||
player->SetUInt32Value(ACTIVE_PLAYER_FIELD_WATCHED_FACTION_INDEX, uint32(-1));
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public:
|
||||
target->InitStatsForLevel(true);
|
||||
target->InitTaxiNodesForLevel();
|
||||
target->InitTalentForLevel();
|
||||
target->SetUInt32Value(PLAYER_XP, 0);
|
||||
target->SetUInt32Value(ACTIVE_PLAYER_FIELD_XP, 0);
|
||||
|
||||
target->_ApplyAllLevelScaleItemMods(true);
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ public:
|
||||
|
||||
titles &= ~titles2; // remove non-existing titles
|
||||
|
||||
target->SetUInt64Value(PLAYER__FIELD_KNOWN_TITLES, titles);
|
||||
target->SetUInt64Value(ACTIVE_PLAYER_FIELD_KNOWN_TITLES, titles);
|
||||
handler->SendSysMessage(LANG_DONE);
|
||||
|
||||
if (!target->HasTitle(target->GetInt32Value(PLAYER_CHOSEN_TITLE)))
|
||||
|
||||
@@ -203,7 +203,7 @@ class npc_pure_energy : public CreatureScript
|
||||
{
|
||||
npc_pure_energyAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
}
|
||||
|
||||
void JustDied(Unit* killer) override
|
||||
|
||||
@@ -370,7 +370,7 @@ class npc_eye_of_acherus : public CreatureScript
|
||||
{
|
||||
npc_eye_of_acherusAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
|
||||
me->SetDisplayFromModel(0);
|
||||
if (Player* owner = me->GetCharmerOrOwner()->ToPlayer())
|
||||
{
|
||||
me->GetCharmInfo()->InitPossessCreateSpells();
|
||||
@@ -1023,7 +1023,7 @@ class npc_scarlet_miner_cart : public CreatureScript
|
||||
{
|
||||
npc_scarlet_miner_cartAI(Creature* creature) : PassiveAI(creature)
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1); // Modelid2 is a horse.
|
||||
me->SetDisplayFromModel(0); // Modelid2
|
||||
}
|
||||
|
||||
void JustSummoned(Creature* summon) override
|
||||
|
||||
@@ -402,7 +402,7 @@ public:
|
||||
|
||||
void Initialize()
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCast(me, SPELL_DARKFIEND_SKIN, true);
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ class npc_voljin_zulaman : public CreatureScript
|
||||
{
|
||||
npc_voljin_zulamanAI(Creature* creature) : ScriptedAI(creature), _instance(creature->GetInstanceScript())
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
|
||||
me->SetDisplayFromModel(0);
|
||||
if (_instance->GetData(DATA_ZULAMAN_STATE) == NOT_STARTED)
|
||||
me->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP);
|
||||
}
|
||||
|
||||
@@ -324,7 +324,6 @@ public:
|
||||
{
|
||||
_events.Reset();
|
||||
_events.ScheduleEvent(EVENT_DETERMINE_EVENT, Seconds(2));
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->GetRandomValidModelId());
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
|
||||
@@ -248,7 +248,7 @@ public:
|
||||
void Reset() override
|
||||
{
|
||||
_events.Reset();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
}
|
||||
|
||||
void EnterCombat(Unit* /*who*/) override
|
||||
|
||||
@@ -173,7 +173,7 @@ public:
|
||||
events.Reset();
|
||||
events.ScheduleEvent(EVENT_AURA, 1 * IN_MILLISECONDS);
|
||||
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
DoCast(SPELL_PUTRID_MUSHROOM);
|
||||
|
||||
if (me->GetEntry() == NPC_POISONOUS_MUSHROOM)
|
||||
|
||||
+3
-3
@@ -254,10 +254,10 @@ class boss_anubarak_trial : public CreatureScript
|
||||
_burrowGUID.push_back(summoned->GetGUID());
|
||||
summoned->SetReactState(REACT_PASSIVE);
|
||||
summoned->CastSpell(summoned, SPELL_CHURNING_GROUND, false);
|
||||
summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid2);
|
||||
summoned->SetDisplayFromModel(1);
|
||||
break;
|
||||
case NPC_SPIKE:
|
||||
summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid1);
|
||||
summoned->SetDisplayFromModel(0);
|
||||
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 0.0f, true))
|
||||
{
|
||||
summoned->CombatStart(target);
|
||||
@@ -620,7 +620,7 @@ class npc_frost_sphere : public CreatureScript
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
DoCast(SPELL_FROST_SPHERE);
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
me->GetMotionMaster()->MoveRandom(20.0f);
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -489,7 +489,7 @@ class npc_firebomb : public CreatureScript
|
||||
DoCast(me, SPELL_FIRE_BOMB_DOT, true);
|
||||
SetCombatMovement(false);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 /*diff*/) override
|
||||
|
||||
+3
-3
@@ -306,7 +306,7 @@ class boss_lich_king_toc : public CreatureScript
|
||||
if (Creature* summoned = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[2].GetPositionX(), ToCCommonLoc[2].GetPositionY(), ToCCommonLoc[2].GetPositionZ(), 5, TEMPSUMMON_TIMED_DESPAWN, 1*MINUTE*IN_MILLISECONDS))
|
||||
{
|
||||
summoned->CastSpell(summoned, 51807, false);
|
||||
summoned->SetDisplayId(summoned->GetCreatureTemplate()->Modelid2);
|
||||
summoned->SetDisplayFromModel(1);
|
||||
}
|
||||
|
||||
_instance->SetBossState(BOSS_LICH_KING, IN_PROGRESS);
|
||||
@@ -497,11 +497,11 @@ class npc_fizzlebang_toc : public CreatureScript
|
||||
me->GetMotionMaster()->MovementExpired();
|
||||
Talk(SAY_STAGE_1_03);
|
||||
me->HandleEmoteCommand(EMOTE_ONESHOT_SPELL_CAST_OMNI);
|
||||
if (Unit* pTrigger = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.69494f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
if (Creature* pTrigger = me->SummonCreature(NPC_TRIGGER, ToCCommonLoc[1].GetPositionX(), ToCCommonLoc[1].GetPositionY(), ToCCommonLoc[1].GetPositionZ(), 4.69494f, TEMPSUMMON_MANUAL_DESPAWN))
|
||||
{
|
||||
_triggerGUID = pTrigger->GetGUID();
|
||||
pTrigger->SetObjectScale(2.0f);
|
||||
pTrigger->SetDisplayId(pTrigger->ToCreature()->GetCreatureTemplate()->Modelid1);
|
||||
pTrigger->SetDisplayFromModel(0);
|
||||
pTrigger->CastSpell(pTrigger, SPELL_WILFRED_PORTAL, false);
|
||||
}
|
||||
_instance->SetData(TYPE_EVENT, 1132);
|
||||
|
||||
@@ -2587,7 +2587,7 @@ class npc_quel_delar_sword : public CreatureScript
|
||||
npc_quel_delar_swordAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
_instance = me->GetInstanceScript();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
_intro = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -272,7 +272,7 @@ class npc_pit_of_saron_icicle : public CreatureScript
|
||||
{
|
||||
npc_pit_of_saron_icicleAI(Creature* creature) : PassiveAI(creature)
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
|
||||
me->SetDisplayFromModel(0);
|
||||
}
|
||||
|
||||
void IsSummonedBy(Unit* summoner) override
|
||||
|
||||
@@ -173,7 +173,7 @@ class boss_sapphiron : public CreatureScript
|
||||
switch(spell->Id)
|
||||
{
|
||||
case SPELL_CHECK_RESISTS:
|
||||
if (target && target->GetResistance(SPELL_SCHOOL_FROST) > MAX_FROST_RESISTANCE)
|
||||
if (target && target->GetResistance(SPELL_SCHOOL_MASK_FROST) > MAX_FROST_RESISTANCE)
|
||||
_canTheHundredClub = false;
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ class npc_chaotic_rift : public CreatureScript
|
||||
void Reset() override
|
||||
{
|
||||
Initialize();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
DoCast(me, SPELL_ARCANEFORM, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -586,7 +586,7 @@ class boss_flame_leviathan_seat : public CreatureScript
|
||||
boss_flame_leviathan_seatAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
instance = creature->GetInstanceScript();
|
||||
}
|
||||
|
||||
|
||||
@@ -188,7 +188,7 @@ class npc_flash_freeze : public CreatureScript
|
||||
{
|
||||
Initialize();
|
||||
instance = me->GetInstanceScript();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
}
|
||||
@@ -264,7 +264,7 @@ class npc_ice_block : public CreatureScript
|
||||
npc_ice_blockAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
instance = me->GetInstanceScript();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED | UNIT_FLAG_PACIFIED);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
}
|
||||
@@ -557,7 +557,7 @@ class npc_icicle : public CreatureScript
|
||||
npc_icicleAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid1);
|
||||
me->SetDisplayFromModel(0);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_PACIFIED | UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
@@ -612,7 +612,7 @@ class npc_snowpacked_icicle : public CreatureScript
|
||||
npc_snowpacked_icicleAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
Initialize();
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE | UNIT_FLAG_NOT_SELECTABLE | UNIT_FLAG_PACIFIED);
|
||||
me->SetControlled(true, UNIT_STATE_ROOT);
|
||||
me->SetReactState(REACT_PASSIVE);
|
||||
@@ -954,7 +954,7 @@ class npc_toasty_fire : public CreatureScript
|
||||
{
|
||||
npc_toasty_fireAI(Creature* creature) : ScriptedAI(creature)
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
|
||||
@@ -193,7 +193,7 @@ class boss_razorscale_controller : public CreatureScript
|
||||
{
|
||||
boss_razorscale_controllerAI(Creature* creature) : BossAI(creature, DATA_RAZORSCALE_CONTROL)
|
||||
{
|
||||
me->SetDisplayId(me->GetCreatureTemplate()->Modelid2);
|
||||
me->SetDisplayFromModel(1);
|
||||
}
|
||||
|
||||
void Reset() override
|
||||
|
||||
@@ -150,7 +150,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
{
|
||||
Initialize();
|
||||
_Reset();
|
||||
me->SetArmor(defaultarmor);
|
||||
me->SetArmor(defaultarmor, 0);
|
||||
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
|
||||
me->SetVisible(true);
|
||||
me->SetObjectScale(defaultsize);
|
||||
@@ -403,7 +403,7 @@ class boss_high_astromancer_solarian : public CreatureScript
|
||||
me->SetVisible(true);
|
||||
Talk(SAY_VOIDA);
|
||||
Talk(SAY_VOIDB);
|
||||
me->SetArmor(WV_ARMOR);
|
||||
me->SetArmor(WV_ARMOR, 0);
|
||||
me->SetDisplayId(MODEL_VOIDWALKER);
|
||||
me->SetObjectScale(defaultsize*2.5f);
|
||||
}
|
||||
|
||||
@@ -300,8 +300,8 @@ public:
|
||||
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 fire = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 fire = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 maximum = (fire > shadow) ? fire : shadow;
|
||||
if (maximum < 0)
|
||||
maximum = 0;
|
||||
@@ -328,8 +328,8 @@ public:
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
//the damage bonus used for pets is either fire or shadow damage, whatever is higher
|
||||
int32 fire = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 fire = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_FIRE) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_FIRE);
|
||||
int32 shadow = owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_POS + SPELL_SCHOOL_SHADOW) - owner->GetInt32Value(ACTIVE_PLAYER_FIELD_MOD_DAMAGE_DONE_NEG + SPELL_SCHOOL_SHADOW);
|
||||
int32 maximum = (fire > shadow) ? fire : shadow;
|
||||
float bonusDamage = 0.0f;
|
||||
|
||||
@@ -450,7 +450,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FIRE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -496,7 +496,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FROST), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -507,7 +507,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_ARCANE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -518,7 +518,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_NATURE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -559,7 +559,7 @@ public:
|
||||
if (pet->IsPet())
|
||||
if (Unit* owner = pet->ToPet()->GetOwner())
|
||||
{
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_SHADOW), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1025,7 +1025,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FROST), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FROST), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1041,7 +1041,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_FIRE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_FIRE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1057,7 +1057,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_NATURE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_NATURE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1103,7 +1103,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_SHADOW), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_SHADOW), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
@@ -1119,7 +1119,7 @@ public:
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_ARCANE), 40);
|
||||
int32 const ownerBonus = CalculatePct(owner->GetResistance(SPELL_SCHOOL_MASK_ARCANE), 40);
|
||||
amount += ownerBonus;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2606,8 +2606,8 @@ public:
|
||||
init.SetFacing(o);
|
||||
init.Launch();
|
||||
who->m_Events.AddEvent(new CastFoodSpell(who, _chairSpells.at(who->GetEntry())), who->m_Events.CalculateTime(1000));
|
||||
if (who->GetTypeId() == TYPEID_UNIT)
|
||||
who->SetDisplayId(who->ToCreature()->GetCreatureTemplate()->Modelid1);
|
||||
if (Creature* creature = who->ToCreature())
|
||||
creature->SetDisplayFromModel(0);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user