mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 01:37:00 +00:00
[7523] Fixed: players will now drop flag in battleground if they cast immunity buff on themselves.
TODO: players who carry flag in bg are imune to immunity buffs casted by friendly players. (todo added to code). Bug: if paladin casts Hand of protection on flag carrier - flag will be dropped, but he should get "target is immune" message. Fixed: Do not call Battleground::Update for battleground template objects. Fixed: Do not allow immune player to click on object in battleground (not sure if this is correct in all cases). Signed-off-by: Triply <triply@getmangos.com>
This commit is contained in:
parent
3d6c7e59a7
commit
0f6b2ab9ae
10 changed files with 91 additions and 103 deletions
|
|
@ -2369,6 +2369,8 @@ void Spell::EffectPowerDrain(uint32 i)
|
|||
|
||||
void Spell::EffectSendEvent(uint32 EffectIndex)
|
||||
{
|
||||
/* we do not drop a flag by sendevent system, OBSOLETE CODE:
|
||||
this code caused crashes
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER && ((Player*)m_caster)->InBattleGround())
|
||||
{
|
||||
BattleGround* bg = ((Player *)m_caster)->GetBattleGround();
|
||||
|
|
@ -2377,25 +2379,22 @@ void Spell::EffectSendEvent(uint32 EffectIndex)
|
|||
switch(m_spellInfo->Id)
|
||||
{
|
||||
case 23333: // Pickup Horde Flag
|
||||
/*do not uncomment .
|
||||
/*do not uncomment
|
||||
if(bg->GetTypeID()==BATTLEGROUND_WS)
|
||||
bg->EventPlayerClickedOnFlag((Player*)m_caster, gameObjTarget);
|
||||
sLog.outDebug("Send Event Horde Flag Picked Up");
|
||||
break;
|
||||
/* not used :
|
||||
case 23334: // Drop Horde Flag
|
||||
if(bg->GetTypeID()==BATTLEGROUND_WS)
|
||||
bg->EventPlayerDroppedFlag((Player*)m_caster);
|
||||
sLog.outDebug("Drop Horde Flag");
|
||||
break;
|
||||
*/
|
||||
case 23335: // Pickup Alliance Flag
|
||||
/*do not uncomment ... (it will cause crash, because of null targetobject!) anyway this is a bad way to call that event, because it would cause recursion
|
||||
/*do not uncomment - it will cause crash, because of null targetobject!
|
||||
if(bg->GetTypeID()==BATTLEGROUND_WS)
|
||||
bg->EventPlayerClickedOnFlag((Player*)m_caster, gameObjTarget);
|
||||
sLog.outDebug("Send Event Alliance Flag Picked Up");
|
||||
break;
|
||||
/* not used :
|
||||
case 23336: // Drop Alliance Flag
|
||||
if(bg->GetTypeID()==BATTLEGROUND_WS)
|
||||
bg->EventPlayerDroppedFlag((Player*)m_caster);
|
||||
|
|
@ -2410,19 +2409,17 @@ void Spell::EffectSendEvent(uint32 EffectIndex)
|
|||
if(bg->GetTypeID()==BATTLEGROUND_WS)
|
||||
bg->EventPlayerClickedOnFlag((Player*)m_caster, gameObjTarget);
|
||||
sLog.outDebug("Horde Flag Returned");
|
||||
break;*/
|
||||
break;
|
||||
case 34976:
|
||||
/*
|
||||
if(bg->GetTypeID()==BATTLEGROUND_EY)
|
||||
bg->EventPlayerClickedOnFlag((Player*)m_caster, gameObjTarget);
|
||||
*/
|
||||
break;
|
||||
default:
|
||||
sLog.outDebug("Unknown spellid %u in BG event", m_spellInfo->Id);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
sLog.outDebug("Spell ScriptStart %u for spellid %u in EffectSendEvent ", m_spellInfo->EffectMiscValue[EffectIndex], m_spellInfo->Id);
|
||||
sWorld.ScriptsStart(sEventScripts, m_spellInfo->EffectMiscValue[EffectIndex], m_caster, focusObject);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue