Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/contrib/extractor/ad.exe b/contrib/extractor/ad.exe
- index a98095e..81b002e 100755
- Binary files a/contrib/extractor/ad.exe and b/contrib/extractor/ad.exe differ
- diff --git a/src/game/BattleGroundDS.cpp b/src/game/BattleGroundDS.cpp
- diff --git a/src/game/BattleGroundMgr.cpp b/src/game/BattleGroundMgr.cpp
- index b946fa7..0eeb441 100644
- --- a/src/game/BattleGroundMgr.cpp
- +++ b/src/game/BattleGroundMgr.cpp
- @@ -1498,7 +1498,7 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
- //for arenas there is random map used
- if (bg_template->isArena())
- {
- - BattleGroundTypeId arenas[] = {BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL, BATTLEGROUND_DS, BATTLEGROUND_RV};
- + BattleGroundTypeId arenas[] = {/*BATTLEGROUND_NA, BATTLEGROUND_BE, BATTLEGROUND_RL, BATTLEGROUND_DS,*/BATTLEGROUND_RV};
- bgTypeId = arenas[urand(0, countof(arenas)-1)];
- bg_template = GetBattleGroundTemplate(bgTypeId);
- if (!bg_template)
- @@ -1526,6 +1526,7 @@ BattleGround * BattleGroundMgr::CreateNewBattleGround(BattleGroundTypeId bgTypeI
- BattleGround *bg = NULL;
- // create a copy of the BG template
- +
- switch(bgTypeId)
- {
- case BATTLEGROUND_AV:
- diff --git a/src/game/BattleGroundRV.cpp b/src/game/BattleGroundRV.cpp
- index 866fd6c..5329558 100644
- --- a/src/game/BattleGroundRV.cpp
- +++ b/src/game/BattleGroundRV.cpp
- @@ -24,6 +24,14 @@
- #include "GameObject.h"
- #include "Language.h"
- +/* ScriptData
- +SDName: Ring of Valor
- +SD%Complete:
- +SDAuthor: Bear and MichalPolko
- +SDComment: Need corect pilars and spikes.
- +SDCategory: Karazhan
- +EndScriptData */
- +
- BattleGroundRV::BattleGroundRV()
- {
- m_StartDelayTimes[BG_STARTING_EVENT_FIRST] = BG_START_DELAY_1M;
- @@ -59,10 +67,9 @@ void BattleGroundRV::Update(uint32 diff)
- plr->TeleportTo(618, plr->GetPositionX(), plr->GetPositionY(), 29, plr->GetOrientation(), false);
- }
- m_uiTeleport = 1000;
- - }
- - else
- - m_uiTeleport -= diff;
- + }else m_uiTeleport -= diff;
- + //Pilars
- if (m_uiPillarSwitch < diff)
- {
- for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- @@ -75,7 +82,7 @@ void BattleGroundRV::Update(uint32 diff)
- for (int i = 0; i < 8; ++i)
- {
- - if (GameObject * pPillar = plr->GetClosestGameObjectWithEntry(plr, m_uiObjects[i], 100))
- + if (GameObject * pPillar = plr->GetClosestGameObjectWithEntry(plr, m_uiObjects[i], 200.0f))
- {
- pPillar->SetLootState(GO_READY);
- pPillar->UseDoorOrButton(RESPAWN_ONE_DAY);
- @@ -84,18 +91,42 @@ void BattleGroundRV::Update(uint32 diff)
- break; // End on 1 succesful iteration
- }
- // + urand(0, 30000);
- - m_uiPillarSwitch = 120000;
- - }
- - else
- - m_uiPillarSwitch -= diff;
- + m_uiPillarSwitch = 20000;
- + }else m_uiPillarSwitch -= diff;
- +
- + if(m_uiSpikesStart < diff)
- + {
- + m_uiSpikesStart = 10000;
- + //m_bSpikes = true;
- + }else m_uiSpikesStart -= diff;
- +
- + if(m_uiSpikesTimer < diff)
- + {
- + if(m_bSpikes)
- + {
- + for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- + {
- + Player * plr = sObjectMgr.GetPlayer(itr->first);
- +
- + const int m_uiObjects[4] = {194583, 194584, 194585, 194587};
- +
- + for (int i = 0; i < 4; ++i)
- + {
- + if (plr && plr->GetClosestGameObjectWithEntry(plr, m_uiObjects[i], 4.0f))
- + {
- + plr->CastSpell(plr, SPELL_SPIKES, true);
- + }
- + }
- + }
- + }
- + m_uiSpikesTimer = 2000;
- + }else m_uiSpikesTimer -= diff;
- - if (m_uiFireTimer < diff)
- + if(m_uiSpikesStop < diff)
- {
- - // Handle Fire-lines
- - m_uiFireTimer = 90000 + urand(0, 30000);
- - }
- - else
- - m_uiFireTimer -= diff;
- + m_uiSpikesStop = 25000;
- + //m_bSpikes = false;
- + }else m_uiSpikesStop -= diff;
- }
- }
- @@ -187,8 +218,12 @@ void BattleGroundRV::Reset()
- //call parent's class reset
- BattleGround::Reset();
- m_uiTeleport = 22000;
- - m_uiFireTimer = 90000;
- - m_uiPillarSwitch = 45000 + urand(0, 30000);
- + m_uiFireTimer = 15000;
- + m_uiPillarSwitch = 20000;
- + m_uiSpikesTimer = 1000;
- + m_bSpikes = true;
- + m_uiSpikesStart = 10000;
- + m_uiSpikesStop = 25000;
- }
- bool BattleGroundRV::SetupBattleGround()
- diff --git a/src/game/BattleGroundRV.h b/src/game/BattleGroundRV.h
- index 95edb3d..19be332 100644
- --- a/src/game/BattleGroundRV.h
- +++ b/src/game/BattleGroundRV.h
- @@ -20,6 +20,83 @@
- class BattleGround;
- +enum BattlegroundRVObjectTypes
- +{
- + BG_RV_OBJECT_BUFF_1,
- + BG_RV_OBJECT_BUFF_2,
- + BG_RV_OBJECT_FIRE_1,
- + BG_RV_OBJECT_FIRE_2,
- + BG_RV_OBJECT_FIREDOOR_1,
- + BG_RV_OBJECT_FIREDOOR_2,
- +
- + BG_RV_OBJECT_PILAR_1,
- + BG_RV_OBJECT_PILAR_3,
- + BG_RV_OBJECT_GEAR_1,
- + BG_RV_OBJECT_GEAR_2,
- +
- + BG_RV_OBJECT_PILAR_2,
- + BG_RV_OBJECT_PILAR_4,
- + BG_RV_OBJECT_PULLEY_1,
- + BG_RV_OBJECT_PULLEY_2,
- +/*
- + BG_RV_OBJECT_PILAR_COLLISION_1,
- + BG_RV_OBJECT_PILAR_COLLISION_2,
- + BG_RV_OBJECT_PILAR_COLLISION_3,
- + BG_RV_OBJECT_PILAR_COLLISION_4,
- +*/
- + BG_RV_OBJECT_ELEVATOR_1,
- + BG_RV_OBJECT_ELEVATOR_2,
- + BG_RV_OBJECT_FENCE_1,
- + BG_RV_OBJECT_FENCE_2,
- + BG_RV_OBJECT_MAX,
- +};
- +
- +enum BattlegroundRVObjects
- +{
- + BG_RV_OBJECT_TYPE_BUFF_1 = 184663,
- + BG_RV_OBJECT_TYPE_BUFF_2 = 184664,
- + BG_RV_OBJECT_TYPE_FIRE_1 = 192704,
- + BG_RV_OBJECT_TYPE_FIRE_2 = 192705,
- +
- + SPELL_SPIKES = 77975,
- +
- + BG_RV_OBJECT_TYPE_FIREDOOR_2 = 192387,
- + BG_RV_OBJECT_TYPE_FIREDOOR_1 = 192388,
- + BG_RV_OBJECT_TYPE_PULLEY_1 = 192389,
- + BG_RV_OBJECT_TYPE_PULLEY_2 = 192390,
- + BG_RV_OBJECT_TYPE_FENCE_1 = 192391,
- + BG_RV_OBJECT_TYPE_FENCE_2 = 192392,
- + BG_RV_OBJECT_TYPE_GEAR_1 = 192393,
- + BG_RV_OBJECT_TYPE_GEAR_2 = 192394,
- + BG_RV_OBJECT_TYPE_ELEVATOR_1 = 194582,
- + BG_RV_OBJECT_TYPE_ELEVATOR_2 = 194586,
- +/*
- + BG_RV_OBJECT_TYPE_PILAR_COLLISION_1 = 194580, // axe
- + BG_RV_OBJECT_TYPE_PILAR_COLLISION_2 = 194579, // arena
- + BG_RV_OBJECT_TYPE_PILAR_COLLISION_3 = 194581, // lightning
- + BG_RV_OBJECT_TYPE_PILAR_COLLISION_4 = 194578, // ivory
- +*/
- + BG_RV_OBJECT_TYPE_PILAR_1 = 194583, // axe
- + BG_RV_OBJECT_TYPE_PILAR_2 = 194584, // arena
- + BG_RV_OBJECT_TYPE_PILAR_3 = 194585, // lightning
- + BG_RV_OBJECT_TYPE_PILAR_4 = 194587, // ivory
- +};
- +
- +enum BattlegroundRVData
- +{
- + BG_RV_STATE_OPEN_FENCES,
- + BG_RV_STATE_OPEN_PILARS,
- + BG_RV_STATE_CLOSE_PILARS,
- + BG_RV_STATE_OPEN_FIRE,
- + BG_RV_STATE_CLOSE_FIRE,
- + BG_RV_FIRE_TO_PILAR_TIMER = 20000,
- + BG_RV_PILAR_TO_FIRE_TIMER = 5000,
- + BG_RV_FIRST_TIMER = 20133,
- + BG_RV_WORLD_STATE_A = 0xe10,
- + BG_RV_WORLD_STATE_H = 0xe11,
- + BG_RV_WORLD_STATE = 0xe1a,
- +};
- +
- class BattleGroundRVScore : public BattleGroundScore
- {
- public:
- @@ -44,6 +121,7 @@ class BattleGroundRV : public BattleGround
- void RemovePlayer(Player *plr, ObjectGuid guid);
- void HandleAreaTrigger(Player *Source, uint32 Trigger);
- + void Check();
- bool SetupBattleGround();
- virtual void Reset();
- virtual void FillInitialWorldStates(WorldPacket &d, uint32& count);
- @@ -53,5 +131,11 @@ class BattleGroundRV : public BattleGround
- uint32 m_uiTeleport;
- uint32 m_uiPillarSwitch;
- uint32 m_uiFireTimer;
- + uint32 m_uiTimer;
- + uint32 m_uiState;
- + uint32 m_uiSpikesTimer;
- + uint32 m_uiSpikesStart;
- + uint32 m_uiSpikesStop;
- + bool m_bSpikes;
- };
- #endif
- diff --git a/src/game/BattleGroundSA.cpp b/src/game/BattleGroundSA.cpp
- index 48b458d..4a425df 100644
- --- a/src/game/BattleGroundSA.cpp
- +++ b/src/game/BattleGroundSA.cpp
- @@ -81,7 +81,8 @@ BattleGroundSA::BattleGroundSA()
- GateStatus[i] = 1;
- TimerEnabled = false;
- - TimeST2Round = 120000;
- + TimeST2Round = 12000000;
- + //TimeST2Round = 120000;
- Round_timer = 0;
- Phase = 1;
- GateRoomAncientShrineDamaged = false;
- @@ -211,7 +212,8 @@ void BattleGroundSA::Update(uint32 diff)
- {
- SendMessageToAll(defender == ALLIANCE ? LANG_BG_SA_ALLIANCE_TIMEOUT_END_2ROUND : LANG_BG_SA_HORDE_TIMEOUT_END_2ROUND, CHAT_MSG_BG_SYSTEM_NEUTRAL, NULL);
- RoundScores[1].winner = GetDefender();
- - RoundScores[1].time = 601000;
- + RoundScores[1].time = 60100000;
- + //RoundScores[1].time = 601000;
- for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
- {
- @@ -354,9 +356,12 @@ void BattleGroundSA::ResetWorldStates()
- void BattleGroundSA::UpdateTimer()
- {
- uint32 end_of_round = (BG_SA_ROUNDLENGTH - Round_timer);
- - UpdateWorldState(BG_SA_TIMER_MINUTES, end_of_round/60000);
- + UpdateWorldState(BG_SA_TIMER_MINUTES, end_of_round/600000);
- + UpdateWorldState(BG_SA_TIMER_10SEC, (end_of_round%600000)/100000);
- + UpdateWorldState(BG_SA_TIMER_SEC, ((end_of_round%60000)%100000)/100000);
- + /*UpdateWorldState(BG_SA_TIMER_MINUTES, end_of_round/60000);
- UpdateWorldState(BG_SA_TIMER_10SEC, (end_of_round%60000)/10000);
- - UpdateWorldState(BG_SA_TIMER_SEC, ((end_of_round%60000)%10000)/1000);
- + UpdateWorldState(BG_SA_TIMER_SEC, ((end_of_round%60000)%10000)/1000);*/
- }
- void BattleGroundSA::StartingEventCloseDoors()
- @@ -417,7 +422,7 @@ void BattleGroundSA::UpdatePlayerScore(Player* Source, uint32 type, uint32 value
- void BattleGroundSA::ResetBattle(uint32 winner, Team teamDefending)
- {
- Phase = SA_ROUND_TWO;
- - shipsTimer = 60000;
- + shipsTimer = 40000;
- shipsStarted = false;
- for (int32 i = 0; i <= BG_SA_GATE_MAX; ++i)
- diff --git a/src/game/BattleGroundSA.h b/src/game/BattleGroundSA.h
- diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
- index 59b3e8f..eb20ddf 100644
- --- a/src/game/Spell.cpp
- +++ b/src/game/Spell.cpp
- @@ -7614,14 +7614,33 @@ bool Spell::CheckTarget( Unit* target, SpellEffectIndex eff )
- return false;
- }
- - // Checkout if target is behing particular object
- - switch(m_spellInfo->Id)
- +
- + //Check players if is behing GO
- + std::list<uint32> objects;
- +
- + //This is four pilars in Orgrimmar Arena (Ring of Valor).
- + if (m_caster->GetMapId() == 618)
- + {
- + objects.push_back(194583); // axe
- + objects.push_back(194584); // arena
- + objects.push_back(194585); // lightning
- + objects.push_back(194587); // ivory
- + }
- + else if(m_caster->GetMapId() == 607) //Strand of the Ancients
- {
- - case 68786: // Permafrost (Garfrost)
- - case 70336: // Permafrost Heroic (Garfrost)
- + objects.push_back(192549); //Shrine Gates in SOTA!
- + objects.push_back(190722); //Green
- + objects.push_back(190724); //Blue
- + objects.push_back(190723); //Amethyst
- + objects.push_back(190726); //Red
- + objects.push_back(190727); //Yellow
- + objects.push_back(192829); //Moon
- + }
- +
- + if (!objects.empty())
- + {
- + for(std::list<uint32>::iterator itr = objects.begin(); itr != objects.end(); ++itr)
- {
- - uint32 uiObjectEntry = 196485;
- -
- // Description:
- // code check out if player is hidden behind GO in circle with diameter equal to GO size
- // with center placed on the perimeter of GO
- @@ -7632,16 +7651,17 @@ bool Spell::CheckTarget( Unit* target, SpellEffectIndex eff )
- // / (T) \<- target in safty circle
- std::list<GameObject*>lObjectList;
- - target->GetGameObjectListWithEntryInGrid(lObjectList, target, uiObjectEntry, target->GetDistance2d(m_caster));
- + target->GetGameObjectListWithEntryInGrid(lObjectList, target, *itr, target->GetDistance2d(m_caster));
- float fTargetX, fTargetY, fTargetZ;
- float fCasterX, fCasterY, fCasterZ;
- target->GetPosition(fTargetX, fTargetY, fTargetZ);
- m_caster->GetPosition(fCasterX, fCasterY, fCasterZ);
- +
- for (std::list<GameObject*>::iterator itr = lObjectList.begin(); itr != lObjectList.end(); ++itr)
- {
- float fObjectSize = (*itr)->GetGOInfo()->size;
- if (target->GetDistance2d(*itr) > fObjectSize)
- - continue;
- + continue;
- float fObjectX, fObjectY, fObjectZ;
- (*itr)->GetPosition(fObjectX, fObjectY, fObjectZ);
- @@ -7650,13 +7670,64 @@ bool Spell::CheckTarget( Unit* target, SpellEffectIndex eff )
- fCircleY = fObjectY + fObjectSize*sin(fAlpha);
- fCircleX = fObjectX + fObjectSize*cos(fAlpha);
- if (target->GetDistance2d(fCircleX, fCircleY) <= fObjectSize)
- - return false;
- + return false;
- }
- - break;
- }
- - default: break;
- }
- +
- + /*
- + //Check players if is behing GO
- + std::list<uint32> objects;
- + //This is four pilars in Orgrimmar Arena (Ring of Valor).
- + if (m_caster->GetMapId() == 618)
- + {
- + objects.push_back(194583); // axe
- + objects.push_back(194584); // arena
- + objects.push_back(194585); // lightning
- + objects.push_back(194587); // ivory;
- + }
- + else if (m_spellInfo->Id == 70336)
- + objects.push_back(70336);
- +
- + if (!objects.empty())
- + {
- + for(std::list<uint32>::iterator itr = objects.begin(); itr != objects.end(); ++itr)
- + {
- + // Description:
- + // code check out if player is hidden behind GO in circle with diameter equal to GO size
- + // with center placed on the perimeter of GO
- + // C<- caster
- + // / \<- cone of spell
- + // / \
- + // / (o) \<- shelter object
- + // / (T) \<- target in safty circle
- +
- + std::list<GameObject*>lObjectList;
- + target->GetGameObjectListWithEntryInGrid(lObjectList, target, *itr, target->GetDistance2d(m_caster));
- + float fTargetX, fTargetY, fTargetZ;
- + float fCasterX, fCasterY, fCasterZ;
- + target->GetPosition(fTargetX, fTargetY, fTargetZ);
- + m_caster->GetPosition(fCasterX, fCasterY, fCasterZ);
- +
- + for (std::list<GameObject*>::iterator itr = lObjectList.begin(); itr != lObjectList.end(); ++itr)
- + {
- + float fObjectSize = (*itr)->GetGOInfo()->size;
- + if (target->GetDistance2d(*itr) > fObjectSize)
- + continue;
- +
- + float fObjectX, fObjectY, fObjectZ;
- + (*itr)->GetPosition(fObjectX, fObjectY, fObjectZ);
- + float fAlpha = m_caster->GetAngle(fTargetX, fTargetY);
- + float fCircleX, fCircleY;
- + fCircleY = fObjectY + fObjectSize*sin(fAlpha);
- + fCircleX = fObjectX + fObjectSize*cos(fAlpha);
- + if (target->GetDistance2d(fCircleX, fCircleY) <= fObjectSize)
- + return false;
- + }
- + }
- + }*/
- +
- // Check Sated & Exhaustion debuffs
- if (((m_spellInfo->Id == 2825) && (target->HasAura(57724))) ||
- ((m_spellInfo->Id == 32182) && (target->HasAura(57723))))
- diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
- index 792c03e..bb8b7ea 100644
- --- a/src/game/Unit.cpp
- +++ b/src/game/Unit.cpp
- @@ -5258,6 +5258,56 @@ void Unit::RemoveArenaAuras(bool onleave)
- }
- }
- +/*void Unit::HandleArenaPreparation(bool apply)
- +{
- + ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION, apply);
- +
- + if (apply)
- + {
- + // max regen powers at start preparation
- + SetHealth(GetMaxHealth());
- + SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
- + SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY));
- + }
- + else
- + {
- + // reset originally 0 powers at start/leave
- + SetPower(POWER_RAGE, 0);
- + SetPower(POWER_RUNIC_POWER, 0);
- + SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
- + SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY));
- +
- + // Remove all buffs with duration < 25 sec.
- + for(SpellAuraHolderMap::iterator iter = m_spellAuraHolders.begin(); iter != m_spellAuraHolders.end();)
- + {
- + if (!(iter->second->GetSpellProto()->AttributesEx4 & SPELL_ATTR_EX4_UNK21) &&
- + // don't remove stances, shadowform, pally/hunter auras
- + !iter->second->IsPassive() && // don't remove passive auras
- + iter->second->GetAuraMaxDuration() > 0 &&
- + iter->second->GetAuraMaxDuration() <= 25000)
- + {
- + RemoveSpellAuraHolder(iter->second, AURA_REMOVE_BY_CANCEL);
- + iter = m_spellAuraHolders.begin();
- + }
- + else
- + ++iter;
- + }
- + }
- +
- + if (GetObjectGuid().IsPet())
- + {
- + Pet* pet = ((Pet*)this);
- + if (pet)
- + {
- + Unit* owner = pet->GetOwner();
- + if (owner && (owner->GetTypeId() == TYPEID_PLAYER) && ((Player*)owner)->GetGroup())
- + ((Player*)owner)->SetGroupUpdateFlag(GROUP_UPDATE_FLAG_PET_AURAS);
- + }
- + }
- + else
- + CallForAllControlledUnits(ApplyArenaPreparationWithHelper(apply),CONTROLLED_PET|CONTROLLED_GUARDIANS);
- +}*/
- +
- void Unit::HandleArenaPreparation(bool apply)
- {
- ApplyModFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PREPARATION, apply);
- diff --git a/src/game/Unit.h b/src/game/Unit.h
- index 7dd4ec6..1473fdb 100644
- --- a/src/game/Unit.h
- +++ b/src/game/Unit.h
- @@ -1920,11 +1920,9 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
- SpellAuraProcResult HandleManaShieldAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
- SpellAuraProcResult HandleModResistanceAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
- SpellAuraProcResult HandleRemoveByDamageChanceProc(Unit *pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
- - SpellAuraProcResult HandleNULLProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* /*triggeredByAura*/, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
- - {
- - // no proc handler for this aura type
- - return SPELL_AURA_PROC_OK;
- - }
- + SpellAuraProcResult HandleObsModHealthProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
- + //SpellAuraProcResult HandleObsModManaProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown);
- + SpellAuraProcResult HandleNULLProc(Unit* /*pVictim*/, uint32 /*damage*/, Aura* /*triggeredByAura*/, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/);
- SpellAuraProcResult HandleCantTrigger(Unit* /*pVictim*/, uint32 /*damage*/, Aura* /*triggeredByAura*/, SpellEntry const* /*procSpell*/, uint32 /*procFlag*/, uint32 /*procEx*/, uint32 /*cooldown*/)
- {
- // this aura type can't proc
- diff --git a/src/game/UnitAuraProcHandler.cpp b/src/game/UnitAuraProcHandler.cpp
- index f008c1d..2c57ca0 100644
- --- a/src/game/UnitAuraProcHandler.cpp
- +++ b/src/game/UnitAuraProcHandler.cpp
- @@ -52,7 +52,8 @@ pAuraProcHandler AuraProcHandler[TOTAL_AURAS]=
- &Unit::HandleNULLProc, // 17 SPELL_AURA_MOD_STEALTH_DETECT
- &Unit::HandleRemoveByDamageProc, // 18 SPELL_AURA_MOD_INVISIBILITY
- &Unit::HandleNULLProc, // 19 SPELL_AURA_MOD_INVISIBILITY_DETECTION
- - &Unit::HandleNULLProc, // 20 SPELL_AURA_OBS_MOD_HEALTH
- + &Unit::HandleObsModHealthProc, // 20 SPELL_AURA_OBS_MOD_HEALTH
- + //&Unit::HandleObsModManaProc, // 21 SPELL_AURA_OBS_MOD_MANA
- &Unit::HandleNULLProc, // 21 SPELL_AURA_OBS_MOD_MANA
- &Unit::HandleModResistanceAuraProc, // 22 SPELL_AURA_MOD_RESISTANCE
- &Unit::HandleNULLProc, // 23 SPELL_AURA_PERIODIC_TRIGGER_SPELL
- @@ -1872,10 +1873,10 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura
- // Glyph of Rejuvenation
- case 54754:
- {
- - if (!pVictim || pVictim->GetHealthPercent() >= 50.0f)
- + if (!pVictim || pVictim->GetHealthPercent() > 50.0f)
- return SPELL_AURA_PROC_FAILED;
- - target = pVictim;
- + //target = pVictim;
- triggered_spell_id = 54755;
- basepoints[0] = int32(damage * triggerAmount / 100);
- break;
- @@ -5114,3 +5115,16 @@ SpellAuraProcResult Unit::HandleRemoveByDamageChanceProc(Unit* pVictim, uint32 d
- return SPELL_AURA_PROC_FAILED;
- }
- +
- +SpellAuraProcResult Unit::HandleObsModHealthProc(Unit* pVictim, uint32 damage, Aura* triggeredByAura, SpellEntry const *procSpell, uint32 procFlag, uint32 procEx, uint32 cooldown)
- +{
- + if (triggeredByAura->GetId() == 44521)
- + {
- + SetHealth(GetMaxHealth());
- + SetPower(POWER_MANA, GetMaxPower(POWER_MANA));
- + SetPower(POWER_ENERGY, GetMaxPower(POWER_ENERGY));
- + }
- +
- + return SPELL_AURA_PROC_OK;
- +}
- +
Add Comment
Please, Sign In to add comment