Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp
- index c8cd603..94a6bc9 100644
- --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp
- +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp
- @@ -37,12 +37,26 @@ enum
- SPELL_COLD_FLAME = 69146,
- SPELL_COLD_FLAME_0 = 69145,
- SPELL_COLD_FLAME_1 = 69147,
- - SPELL_BONE_STRIKE = 69057,
- + SPELL_BONE_STRIKE_10N = 69057,
- + SPELL_BONE_STRIKE_25N = 70826,
- + SPELL_BONE_STRIKE_10H = 72088,
- + SPELL_BONE_STRIKE_25H = 72089,
- SPELL_BONE_STORM = 69076,
- SPELL_BONE_STRIKE_IMPALE = 69065,
- SPELL_VEHICLE_HARDCODED = 46598,
- - SPELL_BONE_STORM_STRIKE = 69075,
- + SPELL_BONE_STORM_STRIKE_10H = 73144,
- + SPELL_BONE_STORM_STRIKE_25H = 73145,
- + // Ачивки
- + ACHIEVEMENT_BONED_10 = 4534, // 10 игроков
- + ACHIEVEMENT_BONED_25 = 4610, // 25 игроков
- };
- +/* Нужно записать в базу мангоса:
- +UPDATE `creature_template` SET `ScriptName`='mob_bone_spike' WHERE `entry`=36619;
- +UPDATE `creature_template` SET `ScriptName`='mob_bone_spike' WHERE `entry`=38712;
- +*/
- +float Xangle[4]; // Массив углов
- +uint32 m_uiColdFlameDuration; // Длительность лужи
- +bool m_bBonedAchieve; // Ачив
- struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public BSWScriptedAI
- {
- @@ -55,6 +69,34 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public BSWScriptedAI
- ScriptedInstance *pInstance;
- bool intro;
- + bool _cleave; // Включатель клива
- + uint32 _uiCleaveTimer; // Таймер до клива
- + uint32 uiCleaveTimer; // Таймер клива
- + uint32 uiBoneStormTimer; // Таймер вихря костей
- + uint32 uiStormDuration; // Длительность вихря костей
- + uint32 uiColdFlameTimer; // Таймер луж
- + uint32 uiBoneStrikeTimer; // Таймер костяного шипа
- + uint32 uiChargeTimer; // Таймер чаржа во время вихря
- +
- +
- + // Функция для определения сложности и соответствующих таймеров и скиллов
- + uint32 _getmode(uint32 mod1, uint32 mod2, uint32 mod3, uint32 mod4)
- + {
- + switch (m_creature->GetMap()->GetDifficulty())
- + {
- + case RAID_DIFFICULTY_10MAN_NORMAL:
- + return mod1;
- + case RAID_DIFFICULTY_25MAN_NORMAL:
- + return mod2;
- + case RAID_DIFFICULTY_10MAN_HEROIC:
- + return mod3;
- + case RAID_DIFFICULTY_25MAN_HEROIC:
- + return mod4;
- + default:
- + return mod1;
- + };
- + }
- +
- void Reset()
- {
- if (!pInstance) return;
- @@ -62,7 +104,23 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public BSWScriptedAI
- resetTimers();
- m_creature->SetSpeedRate(MOVE_RUN, 1);
- m_creature->SetSpeedRate(MOVE_WALK, 1);
- -// m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE);
- +
- + Xangle[0] = M_PI_F / 4; // 1й угол пи / 4
- + Xangle[1] = (3 * M_PI_F) / 4.0f; // 2й угол 3пи / 4
- + Xangle[2] = (5 * M_PI_F) / 4.0f; // 3й угол 5пи / 4
- + Xangle[3] = (7 * M_PI_F) / 4.0f; // 4й угол 7пи / 4
- +
- + m_bBonedAchieve = false;
- + _cleave = false;
- + _uiCleaveTimer = 10000;
- + uiCleaveTimer = 2000;
- + uiBoneStormTimer = 45000;
- + uiColdFlameTimer = 8000;
- + m_uiColdFlameDuration = _getmode(3000, 3000, 8000, 8000);
- + uiStormDuration = _getmode(20000, 20000, 30000, 30000);
- + uiBoneStrikeTimer = 17000;
- + uiChargeTimer = 5000;
- +
- }
- void MoveInLineOfSight(Unit* pWho)
- @@ -93,11 +151,12 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public BSWScriptedAI
- void KilledUnit(Unit* pVictim)
- {
- - switch (urand(0,1)) {
- - case 0:
- - DoScriptText(-1631006,m_creature,pVictim);
- - break;
- - case 1:
- + switch (urand(0,1))
- + {
- + case 0:
- + DoScriptText(-1631006,m_creature,pVictim);
- + break;
- + case 1:
- DoScriptText(-1631007,m_creature,pVictim);
- break;
- };
- @@ -105,112 +164,222 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public BSWScriptedAI
- void JustDied(Unit *killer)
- {
- + // Ачивка
- + if ((pInstance) && (m_bBonedAchieve))
- + pInstance->DoCompleteAchievement(_getmode(4534, 4610, 4534, 4610));
- +
- if(pInstance) pInstance->SetData(TYPE_MARROWGAR, DONE);
- DoScriptText(-1631009,m_creature);
- }
- - void doSummonSpike(Unit* pTarget)
- - {
- - if (!pTarget || !pTarget->isAlive()) return;
- - float fPosX, fPosY, fPosZ;
- - pTarget->GetPosition(fPosX, fPosY, fPosZ);
- - if (Unit* pSpike = doSummon(NPC_BONE_SPIKE, fPosX, fPosY, fPosZ + 0.5f))
- - {
- - pSpike->SetOwnerGuid(m_creature->GetObjectGuid());
- - pSpike->SetInCombatWith(pTarget);
- - pSpike->AddThreat(pTarget, 1000.0f);
- - }
- - }
- -
- void UpdateAI(const uint32 diff)
- {
- + float fX, fY;
- if (!m_creature->SelectHostileTarget() || !m_creature->getVictim())
- return;
- switch(getStage())
- {
- - case 0:
- - if (timedQuery(SPELL_BONE_STRIKE, diff))
- - if (Unit* pTarget = doSelectRandomPlayer(SPELL_BONE_STRIKE_IMPALE, false, 60.0f, isHeroic()))
- - if (doCast(SPELL_BONE_STRIKE, pTarget) == CAST_OK)
- - {
- - doSummonSpike(pTarget);
- - switch (urand(0,1)) {
- - case 0:
- - DoScriptText(-1631003,m_creature,pTarget);
- - break;
- - case 1:
- - DoScriptText(-1631004,m_creature,pTarget);
- - break;
- - case 2:
- - DoScriptText(-1631005,m_creature,pTarget);
- - break;
- - };
- -
- - };
- -
- - if (timedQuery(SPELL_BONE_STORM, diff)) setStage(1);
- -
- - if (timedQuery(SPELL_CALL_COLD_FLAME, diff))
- - {
- - if (urand(0,1)) doCast(SPELL_CALL_COLD_FLAME);
- - else doCast(SPELL_CALL_COLD_FLAME_1);
- -
- - if (m_creature->GetHealthPercent() <= 30.0f)
- - {
- - if (urand(0,1)) doCast(SPELL_CALL_COLD_FLAME);
- - else doCast(SPELL_CALL_COLD_FLAME_1);
- - }
- - }
- -
- - timedCast(SPELL_SABER_LASH, diff);
- -
- - DoMeleeAttackIfReady();
- -
- - break;
- + case 0:
- +
- + // Костяной шип
- + if (uiBoneStrikeTimer <= diff)
- + {
- + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1))
- + {
- + DoCast(pTarget, _getmode(
- + SPELL_BONE_STRIKE_10N,
- + SPELL_BONE_STRIKE_25N,
- + SPELL_BONE_STRIKE_10H,
- + SPELL_BONE_STRIKE_25H));
- + switch (urand(0,2))
- + {
- + case 0:
- + DoScriptText(-1631003,m_creature,pTarget);
- + break;
- + case 1:
- + DoScriptText(-1631004,m_creature,pTarget);
- + break;
- + case 2:
- + DoScriptText(-1631005,m_creature,pTarget);
- + break;
- + };
- + }
- + uiBoneStrikeTimer = 17000;
- + }
- + else
- + uiBoneStrikeTimer -= diff;
- +
- + // Вихрь костей
- + if (uiBoneStormTimer <= diff)
- + {
- + uiBoneStormTimer = 90000 - _getmode(20000, 20000, 30000, 30000);
- + setStage(1);
- + }
- + else
- + uiBoneStormTimer -= diff;
- +
- + // Холодное пламя
- + if (uiColdFlameTimer <= diff)
- + {
- + // Ищем рдд и кастуем в его сторону лужу
- + // Если нету, то кастуем в сторону танка
- + Unit* mPlayers[25];
- + uint32 uiRCount = 0;
- + Map* pMap = m_creature->GetMap();
- + Map::PlayerList const& pPlayers = pMap->GetPlayers();
- + if (!pPlayers.isEmpty())
- + {
- + for (Map::PlayerList::const_iterator itr = pPlayers.begin(); itr != pPlayers.end(); ++itr)
- + {
- + Unit* pTarget = itr->getSource();
- + if (pTarget && pTarget->IsInWorld())
- + {
- + if (m_creature->GetDistance(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ()) > 12.0f)
- + {
- + uiRCount++;
- + mPlayers[uiRCount-1] = itr->getSource();
- + }
- +
- + }
- + }
- + }
- + Unit* pTarget;
- + if (uiRCount>0)
- + pTarget = mPlayers[urand(0, uiRCount-1)];
- + else
- + pTarget = m_creature->getVictim();
- + float t = m_creature->GetAngle(pTarget->GetPositionX(), pTarget->GetPositionY());
- + m_creature->GetNearPoint2D(fX, fY, 10.0f, t);
- + m_creature->SummonCreature(NPC_COLD_FLAME, fX, fY,
- + m_creature->GetPositionZ(), t,
- + TEMPSUMMON_TIMED_DESPAWN, m_uiColdFlameDuration);
- + uiColdFlameTimer = 8000;
- + }
- + else
- + uiColdFlameTimer -= diff;
- +
- + if (!_cleave)
- + {
- + // Косторез включается через 10сек
- + if (_uiCleaveTimer <= diff)
- + {
- + _cleave = true;
- + _uiCleaveTimer = 10000;
- + }
- + else
- + _uiCleaveTimer -= diff;
- + }
- + else
- + {
- + // Косторез
- + if (uiCleaveTimer <= diff)
- + {
- + DoCast(m_creature->getVictim(), SPELL_SABER_LASH);
- + uiCleaveTimer = 2000;
- + }
- + else
- + uiCleaveTimer -= diff;
- + }
- +
- + DoMeleeAttackIfReady();
- + break;
- case 1:
- - m_creature->InterruptNonMeleeSpells(true);
- - doCast(SPELL_BONE_STORM);
- - setStage(2);
- - DoScriptText(-1631002,m_creature);
- - DoResetThreat();
- - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE);
- - m_creature->SetSpeedRate(MOVE_RUN, 3);
- - m_creature->SetSpeedRate(MOVE_WALK, 3);
- - break;
- + m_creature->InterruptNonMeleeSpells(true);
- + doCast(SPELL_BONE_STORM);
- + _cleave = false;
- + setStage(2);
- + DoScriptText(-1631002,m_creature);
- + DoResetThreat();
- + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE);
- + m_creature->SetSpeedRate(MOVE_RUN, 3);
- + m_creature->SetSpeedRate(MOVE_WALK, 3);
- + break;
- case 2:
- - if (!m_creature->IsNonMeleeSpellCasted(false)) setStage(3);
- - break;
- + if (!m_creature->IsNonMeleeSpellCasted(false)) setStage(3);
- + break;
- case 3:
- - if (isHeroic())
- - if (timedQuery(SPELL_BONE_STRIKE, diff, true))
- - if (Unit* pTarget = doSelectRandomPlayer(SPELL_BONE_STRIKE_IMPALE, false, 60.0f))
- - doSummonSpike(pTarget);
- -
- - if (timedQuery(SPELL_CALL_COLD_FLAME, diff, true)
- - && m_creature->IsWithinDistInMap(m_creature->getVictim(),2.0f))
- - {
- - pInstance->SetData(DATA_DIRECTION, (uint32)(1000*2.0f*M_PI_F*((float)urand(1,16)/16.0f)));
- -// if (urand(0,1)) doCast(SPELL_CALL_COLD_FLAME);
- -// else doCast(SPELL_CALL_COLD_FLAME_1);
- - float fPosX, fPosY, fPosZ;
- - m_creature->GetPosition(fPosX, fPosY, fPosZ);
- - doSummon(NPC_COLD_FLAME, fPosX, fPosY, fPosZ);
- - DoResetThreat();
- - if (Unit* pTarget = doSelectRandomPlayerAtRange(60.0f))
- - AttackStart(pTarget);
- - }
- - if (!hasAura(SPELL_BONE_STORM_STRIKE, m_creature) && !hasAura(SPELL_BONE_STORM, m_creature)) setStage(4);
- - break;
- +
- + if (uiChargeTimer <= diff)
- + {
- + if (Unit* pChargeTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1))
- + m_creature->GetMotionMaster()->MoveChase(pChargeTarget);
- + uiChargeTimer = 5000;
- + }
- + else
- + uiChargeTimer -= diff;
- +
- + // Костяной шип во время вихря
- + if ((_getmode(0,0,1,1)) && (uiBoneStrikeTimer <= diff))
- + {
- + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1))
- + {
- + DoCast(pTarget, _getmode(0, 0,
- + SPELL_BONE_STORM_STRIKE_10H,
- + SPELL_BONE_STORM_STRIKE_25H));
- + switch (urand(0,2))
- + {
- + case 0:
- + DoScriptText(-1631003,m_creature,pTarget);
- + break;
- + case 1:
- + DoScriptText(-1631004,m_creature,pTarget);
- + break;
- + case 2:
- + DoScriptText(-1631005,m_creature,pTarget);
- + break;
- + };
- + }
- + uiBoneStrikeTimer = 17000;
- + }
- + else
- + uiBoneStrikeTimer -= diff;
- +
- + // Холодное пламя
- + if (uiColdFlameTimer <= diff)
- + {
- + m_creature->GetNearPoint2D(fX, fY, 0.1f, Xangle[0]);
- + m_creature->SummonCreature(NPC_COLD_FLAME, fX, fY, m_creature->GetPositionZ(),
- + Xangle[0],
- + TEMPSUMMON_TIMED_DESPAWN, m_uiColdFlameDuration);
- + m_creature->GetNearPoint2D(fX, fY, 0.1f, Xangle[1]);
- + m_creature->SummonCreature(NPC_COLD_FLAME, fX, fY, m_creature->GetPositionZ(),
- + Xangle[1],
- + TEMPSUMMON_TIMED_DESPAWN, m_uiColdFlameDuration);
- + m_creature->GetNearPoint2D(fX, fY, 0.1f, Xangle[2]);
- + m_creature->SummonCreature(NPC_COLD_FLAME, fX, fY, m_creature->GetPositionZ(),
- + Xangle[2],
- + TEMPSUMMON_TIMED_DESPAWN, m_uiColdFlameDuration);
- + m_creature->GetNearPoint2D(fX, fY, 0.1f, Xangle[3]);
- + m_creature->SummonCreature(NPC_COLD_FLAME, fX, fY, m_creature->GetPositionZ(),
- + Xangle[3],
- + TEMPSUMMON_TIMED_DESPAWN, m_uiColdFlameDuration);
- + uiColdFlameTimer = 8000;
- + }
- + else
- + uiColdFlameTimer -= diff;
- +
- + // Если прошло 20 или 30сек, то вихрь кончается
- + if (uiStormDuration <= diff)
- + {
- + m_creature->RemoveAurasDueToSpell(SPELL_BONE_STORM_STRIKE_10H);
- + m_creature->RemoveAurasDueToSpell(SPELL_BONE_STORM_STRIKE_25H);
- + m_creature->RemoveAurasDueToSpell(SPELL_BONE_STORM);
- + uiStormDuration = _getmode(20000, 20000, 30000, 30000);
- + }
- + else
- + uiStormDuration -= diff;
- +
- + if (!hasAura(SPELL_BONE_STORM_STRIKE_10H, m_creature) && !hasAura(SPELL_BONE_STORM_STRIKE_25H, m_creature) && !hasAura(SPELL_BONE_STORM, m_creature)) setStage(4);
- + break;
- case 4:
- - pInstance->SetData(DATA_DIRECTION, 0);
- - m_creature->SetSpeedRate(MOVE_RUN, 1);
- - m_creature->SetSpeedRate(MOVE_WALK, 1);
- -// m_creature->AddSplineFlag(SPLINEFLAG_WALKMODE);
- - setStage(0);
- - break;
- + pInstance->SetData(DATA_DIRECTION, 0);
- + m_creature->SetSpeedRate(MOVE_RUN, 1);
- + m_creature->SetSpeedRate(MOVE_WALK, 1);
- + setStage(0);
- + break;
- default:
- - break;
- + break;
- }
- if (timedQuery(SPELL_BERSERK, diff))
- @@ -232,26 +401,26 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public BSWScriptedAI
- }
- ScriptedInstance* m_pInstance;
- - bool isFirst;
- - bool isXmode;
- - float m_direction;
- - float x, y, radius;
- - bool isCreator;
- + bool canSum;
- + float x, y;
- + uint32 uiCF;
- + uint32 uiCF1;
- +
- void Reset()
- {
- if(!m_pInstance) return;
- -// m_creature->SetDisplayId(10045);
- m_creature->SetRespawnDelay(7*DAY);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
- m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
- - setStage(0);
- - isCreator = false;
- + canSum = true;
- + uiCF = 800; // Время, через которое появляются новые куски лужи
- + uiCF1 = 100; // Через это время появится дамаг аура вокруг нпц-лужи
- SetCombatMovement(false);
- - doCast(SPELL_COLD_FLAME_0);
- + doCast(SPELL_COLD_FLAME);
- }
- void AttackStart(Unit *who)
- @@ -267,55 +436,33 @@ struct MANGOS_DLL_DECL mob_coldflameAI : public BSWScriptedAI
- void UpdateAI(const uint32 uiDiff)
- {
- if(m_pInstance && m_pInstance->GetData(TYPE_MARROWGAR) != IN_PROGRESS)
- - {
- m_creature->ForcedDespawn();
- - }
- if (m_creature->GetCreatorGuid().IsEmpty()) return;
- - if (!isCreator)
- + if ((uiCF <= uiDiff) && (canSum))
- {
- - if (m_creature->GetCreatorGuid().GetRawValue() == m_pInstance->GetData64(NPC_LORD_MARROWGAR))
- - {
- - isFirst = true;
- - uint32 m_tmpDirection = m_pInstance->GetData(DATA_DIRECTION);
- - m_pInstance->SetData(DATA_DIRECTION,0);
- - if (m_tmpDirection)
- - {
- - m_direction = m_tmpDirection/1000.0f;
- - isXmode = true;
- - }
- - else
- - {
- - m_direction = 2.0f*M_PI_F*((float)urand(1,16)/16.0f);
- - isXmode = false;
- - }
- - } else isFirst = false;
- - isCreator = true;
- - }
- -
- - if (timedQuery(SPELL_COLD_FLAME_0, uiDiff) && !isFirst)
- - m_creature->ForcedDespawn();
- -
- - if (isFirst && timedQuery(SPELL_COLD_FLAME_1, uiDiff, true))
- - {
- - if (getStage() < getSpellData(SPELL_COLD_FLAME_0))
- - {
- - setStage(getStage()+1);
- - radius = getStage()*5;
- - m_creature->GetNearPoint2D(x, y, radius, m_direction);
- - doSummon(NPC_COLD_FLAME, x, y, m_creature->GetPositionZ(), TEMPSUMMON_TIMED_DESPAWN, getSpellData(SPELL_COLD_FLAME_1));
- - if (isXmode)
- - {
- - m_creature->GetNearPoint2D(x, y, radius, m_direction+M_PI_F/2);
- - doSummon(NPC_COLD_FLAME, x, y, m_creature->GetPositionZ(), TEMPSUMMON_TIMED_DESPAWN, getSpellData(SPELL_COLD_FLAME_1));
- - m_creature->GetNearPoint2D(x, y, radius, m_direction+M_PI_F);
- - doSummon(NPC_COLD_FLAME, x, y, m_creature->GetPositionZ(), TEMPSUMMON_TIMED_DESPAWN, getSpellData(SPELL_COLD_FLAME_1));
- - m_creature->GetNearPoint2D(x, y, radius, m_direction+M_PI_F*1.5f);
- - doSummon(NPC_COLD_FLAME, x, y, m_creature->GetPositionZ(), TEMPSUMMON_TIMED_DESPAWN, getSpellData(SPELL_COLD_FLAME_1));
- - }
- - } else m_creature->ForcedDespawn();
- - } else timedCast(SPELL_COLD_FLAME, uiDiff);
- + Creature* tCreature = m_pInstance->GetSingleCreatureFromStorage(NPC_LORD_MARROWGAR);
- +
- + if (m_creature->GetDistance2d(tCreature) > 100)
- + return;
- + m_creature->GetNearPoint2D(x, y, 6.0f, m_creature->GetOrientation());
- + m_creature->SummonCreature(NPC_COLD_FLAME, x, y, m_creature->GetPositionZ(),
- + m_creature->GetOrientation(),
- + TEMPSUMMON_TIMED_DESPAWN, m_uiColdFlameDuration);
- + canSum = false;
- + uiCF = 800;
- + }
- + else
- + uiCF -= uiDiff;
- +
- + if (uiCF1 <= uiDiff)
- + {
- + doCast(SPELL_COLD_FLAME);
- + uiCF1 = 10000;
- + }
- + else
- + uiCF1 -= uiDiff;
- }
- };
- @@ -330,25 +477,42 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public BSWScriptedAI
- ScriptedInstance* m_pInstance;
- ObjectGuid victimGuid;
- + uint32 _uiBonedTimer;
- + uint32 uiBonedTimer; // Таймер ачивки
- void Reset()
- {
- - SetCombatMovement(false);
- + // Шип саммонится игроком, его и берем
- + if (!m_creature->GetCreator()) return;
- + Unit* tCreator = m_creature->GetCreator();
- + if (tCreator->GetTypeId() == TYPEID_PLAYER)
- + {
- + victimGuid = tCreator->GetObjectGuid();
- + if (Player* pVictim = m_creature->GetMap()->GetPlayer(victimGuid))
- + {
- + m_creature->SetInCombatWith(pVictim);
- + DoCast(pVictim, SPELL_BONE_STRIKE_IMPALE);
- + DoCast(pVictim, SPELL_VEHICLE_HARDCODED);
- + uiBonedTimer = 0;
- + _uiBonedTimer = 1000;
- + }
- + }
- +
- + SetCombatMovement(false);
- m_creature->SetRespawnDelay(7*DAY);
- - victimGuid = ObjectGuid();
- m_creature->SetInCombatWithZone();
- }
- - void Aggro(Unit* pWho)
- +
- + /*void Aggro(Unit* pWho)
- {
- - if (victimGuid.IsEmpty() && pWho && pWho->GetTypeId() == TYPEID_PLAYER)
- - {
- - victimGuid = pWho->GetObjectGuid();
- - m_creature->SetInCombatWith(pWho);
- - doCast(SPELL_BONE_STRIKE_IMPALE,pWho);
- - doCast(SPELL_VEHICLE_HARDCODED,pWho);
- + if (Player* pVictim = m_creature->GetMap()->GetPlayer(victimGuid))
- + {
- + m_creature->SetInCombatWith(pVictim);
- + doCast(SPELL_BONE_STRIKE_IMPALE,pVictim);
- + doCast(SPELL_VEHICLE_HARDCODED,pVictim);
- }
- - }
- + }*/
- void DamageTaken(Unit* pDoneBy, uint32 &uiDamage)
- {
- @@ -370,12 +534,24 @@ struct MANGOS_DLL_DECL mob_bone_spikeAI : public BSWScriptedAI
- void JustDied(Unit* Killer)
- {
- + if (uiBonedTimer < 9) m_bBonedAchieve = true;
- +
- if (Player* pVictim = m_creature->GetMap()->GetPlayer(victimGuid))
- doRemove(SPELL_BONE_STRIKE_IMPALE,pVictim);
- + m_creature->ForcedDespawn(1000);
- }
- void UpdateAI(const uint32 uiDiff)
- {
- + // Ачивка
- + if (_uiBonedTimer <= uiDiff)
- + {
- + uiBonedTimer++;
- + _uiBonedTimer = 1000;
- + }
- + else
- + _uiBonedTimer -= uiDiff;
- +
- if(m_pInstance && m_pInstance->GetData(TYPE_MARROWGAR) != IN_PROGRESS)
- {
- if (Player* pVictim = m_creature->GetMap()->GetPlayer(victimGuid))
Advertisement
Add Comment
Please, Sign In to add comment