diff options
Diffstat (limited to 'src')
7 files changed, 70 insertions, 89 deletions
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 6cb0f90d98e..d8c39925dc6 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -148,7 +148,7 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn GameObjectModel* GameObjectModel::Create(const GameObject& go) { - const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(go.GetGOInfo()->displayId); + const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(go.GetDisplayId()); if (!info) return NULL; diff --git a/src/server/game/Entities/GameObject/GameObject.h b/src/server/game/Entities/GameObject/GameObject.h index b3efb47dd6f..41501827dca 100755 --- a/src/server/game/Entities/GameObject/GameObject.h +++ b/src/server/game/Entities/GameObject/GameObject.h @@ -803,6 +803,7 @@ class GameObject : public WorldObject, public GridObject<GameObject> std::string GetAIName() const; void SetDisplayId(uint32 displayid); + uint32 GetDisplayId() const { return GetUInt32Value(GAMEOBJECT_DISPLAYID); } GameObjectModel * m_model; protected: diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 57337d3c6a6..e2c7ebf12d9 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -2797,6 +2797,10 @@ void SpellMgr::LoadSpellCustomAttr() switch (spellInfo->Id) { + case 60256: + //Crashes client on pressing ESC (Maybe because of ReqSpellFocus and GameObject) + spellInfo->AttributesEx4 &= ~SPELL_ATTR4_TRIGGERED; + break; case 1776: // Gouge case 1777: case 8629: @@ -3007,7 +3011,7 @@ void SpellMgr::LoadDbcDataCorrections() switch (spellInfo->Id) { - case 42730: + case 42730: spellInfo->EffectTriggerSpell[EFFECT_1] = 42739; break; case 59735: diff --git a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp index 76237fe1890..270e31f4350 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/boss_eregos.cpp @@ -133,7 +133,7 @@ public: struct boss_eregosAI : public BossAI { boss_eregosAI(Creature* creature) : BossAI(creature, DATA_EREGOS_EVENT) { } - + void Reset() { _Reset(); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp index ef17d6c0721..aaa95631792 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/boss_ingvar_the_plunderer.cpp @@ -154,7 +154,7 @@ public: DoScriptText(YELL_DEAD_1, me); } - if (events.GetPhaseMask() & PHASE_EVENT) + if (events.GetPhaseMask() & (1 << PHASE_EVENT)) damage = 0; } @@ -209,7 +209,7 @@ public: void UpdateAI(const uint32 diff) { - if (!UpdateVictim() && !(events.GetPhaseMask() & PHASE_EVENT)) + if (!UpdateVictim() && !(events.GetPhaseMask() & (1 << PHASE_EVENT))) return; events.Update(diff); @@ -235,7 +235,7 @@ public: events.ScheduleEvent(EVENT_ENRAGE, urand(7,14)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_SMASH: - DoCastVictim(SPELL_SMASH); + DoCastAOE(SPELL_SMASH); events.ScheduleEvent(EVENT_SMASH, urand(12,16)*IN_MILLISECONDS, 0, PHASE_HUMAN); break; case EVENT_JUST_TRANSFORMED: @@ -402,7 +402,8 @@ public: enum eShadowAxe { SPELL_SHADOW_AXE_DAMAGE = 42750, - H_SPELL_SHADOW_AXE_DAMAGE = 59719 + H_SPELL_SHADOW_AXE_DAMAGE = 59719, + POINT_TARGET = 28 }; class mob_ingvar_throw_dummy : public CreatureScript @@ -427,7 +428,7 @@ public: { float x, y, z; target->GetPosition(x, y, z); - me->GetMotionMaster()->MoveCharge(x, y, z, 42.0f, 28); + me->GetMotionMaster()->MoveCharge(x, y, z, 42.0f, POINT_TARGET); target->DisappearAndDie(); } else @@ -438,7 +439,7 @@ public: void MovementInform(uint32 type, uint32 id) { - if (type == POINT_MOTION_TYPE && id == 28) + if (type == EFFECT_MOTION_TYPE && id == POINT_TARGET) { DoCast(me, SPELL_SHADOW_AXE_DAMAGE); me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); diff --git a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp index 35bf7ee0b10..c694aa88338 100644 --- a/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp +++ b/src/server/scripts/Northrend/UtgardeKeep/UtgardeKeep/utgarde_keep.cpp @@ -166,7 +166,7 @@ public: }; }; -enum TickingTimeBomb +enum TickingTimeBomb { SPELL_TICKING_TIME_BOMB_EXPLODE = 59687 }; @@ -189,7 +189,7 @@ class spell_ticking_time_bomb : public SpellScriptLoader if (GetCaster() == GetTarget()) { GetTarget()->CastSpell(GetTarget(), SPELL_TICKING_TIME_BOMB_EXPLODE, true); - } + } } void Register() diff --git a/src/server/scripts/Northrend/borean_tundra.cpp b/src/server/scripts/Northrend/borean_tundra.cpp index 9b207c257fc..224d06e9d3c 100644 --- a/src/server/scripts/Northrend/borean_tundra.cpp +++ b/src/server/scripts/Northrend/borean_tundra.cpp @@ -1667,7 +1667,6 @@ public: /*###### ## npc_imprisoned_beryl_sorcerer ######*/ - enum eImprisionedBerylSorcerer { SPELL_NEURAL_NEEDLE = 45634, @@ -1692,103 +1691,79 @@ public: { npc_imprisoned_beryl_sorcererAI(Creature* creature) : ScriptedAI(creature) {} - uint64 CasterGUID; - - uint32 uiStep; - uint32 uiPhase; + uint32 rebuff; void Reset() { - uiStep = 1; - uiPhase = 0; - CasterGUID = 0; + if (me->GetReactState() != REACT_PASSIVE) + me->SetReactState(REACT_PASSIVE); + + rebuff = 0; + } + + void UpdateAI(const uint32 diff) + { + UpdateVictim(); + + if (rebuff <= diff) + { + if (!me->HasAura(SPELL_COSMETIC_ENSLAVE_CHAINS_SELF)) + { + DoCast(me, SPELL_COSMETIC_ENSLAVE_CHAINS_SELF); + } + rebuff = 180000; + } + else + rebuff -= diff; + + DoMeleeAttackIfReady(); } void EnterCombat(Unit* /*who*/) { } - void SpellHit(Unit* unit, const SpellInfo* pSpell) + void SpellHit(Unit* unit, const SpellInfo* spell) { - if (pSpell->Id == SPELL_NEURAL_NEEDLE && unit->GetTypeId() == TYPEID_PLAYER) + if (spell->Id == SPELL_NEURAL_NEEDLE && unit->GetTypeId() == TYPEID_PLAYER) { - ++uiPhase; - CasterGUID = unit->GetGUID(); + if (Player* player = unit->ToPlayer()) + { + GotStinged(player->GetGUID()); + } } } - void UpdateAI(const uint32 uiDiff) + void GotStinged(uint64 casterGUID) { - ScriptedAI::UpdateAI(uiDiff); - - if (!me->HasAura(SPELL_COSMETIC_ENSLAVE_CHAINS_SELF)) - DoCast(me, SPELL_COSMETIC_ENSLAVE_CHAINS_SELF); - - if (me->GetReactState() != REACT_PASSIVE) - me->SetReactState(REACT_PASSIVE); - - switch (uiPhase) + if (Player* caster = Player::GetPlayer(*me, casterGUID)) { - case 1: - if (uiStep == 1) - { + uint32 step = caster->GetAuraCount(SPELL_NEURAL_NEEDLE) + 1; + switch (step) + { + case 1: DoScriptText(SAY_IMPRISIONED_BERYL_1, me); - uiStep = 2; - } - break; - - case 2: - if (uiStep == 2) - { - DoScriptText(SAY_IMPRISIONED_BERYL_2, me); - uiStep = 3; - } - break; - - case 3: - if (uiStep == 3) - { + break; + case 2: + DoScriptText(SAY_IMPRISIONED_BERYL_2, me, caster); + break; + case 3: DoScriptText(SAY_IMPRISIONED_BERYL_3, me); - uiStep = 4; - } - break; - - case 4: - if (uiStep == 4) - { + break; + case 4: DoScriptText(SAY_IMPRISIONED_BERYL_4, me); - uiStep = 5; - } - break; - - case 5: - if (uiStep == 5) - { - if (Player* pCaster = Unit::GetPlayer(*me, CasterGUID)) - { - DoScriptText(SAY_IMPRISIONED_BERYL_5, me); - pCaster->KilledMonsterCredit(25478, 0); - uiStep = 6; - } - } - break; - - case 6: - if (uiStep == 6) - { - DoScriptText(SAY_IMPRISIONED_BERYL_6, me); - uiStep = 7; - } - break; - - case 7: - if (uiStep == 7) - { + break; + case 5: + DoScriptText(SAY_IMPRISIONED_BERYL_5, me); + break; + case 6: + DoScriptText(SAY_IMPRISIONED_BERYL_6, me, caster); + break; + case 7: DoScriptText(SAY_IMPRISIONED_BERYL_7, me); - uiStep = 1; - uiPhase = 0; - } - break; + caster->KilledMonsterCredit(NPC_IMPRISONED_BERYL_SORCERER, 0); + break; + } } } }; |