*Fix DK presences and their improved versions - original patch by thenecromancer
*Port player to homebind if instance cannot be created in WorldSession::HandleMoveWorldportAckOpcode. --HG-- branch : trunk
This commit is contained in:
@@ -33,9 +33,6 @@ INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comm
|
||||
(-49011, 49009, 0, 'Wyvern Sting'),
|
||||
(-49012, 49010, 0, 'Wyvern Sting'),
|
||||
( 47585, 60069, 0, 'Dispersion (transform/regen)'),
|
||||
( 48265, 49772, 2, 'Unholy Presence'),
|
||||
( 49772, 55222, 2, 'Unholy Presence'),
|
||||
( 48263, 61261, 2, 'Frost Presence'),
|
||||
( 61847, 61848, 2, 'Aspect of te dragonhawk'),
|
||||
( 61846, 61848, 2, 'Aspect of te dragonhawk'),
|
||||
( 47988, 54501, 2, 'Consume Shadows - Rank 9'),
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` IN (48265, 49772, 48263);
|
||||
@@ -70,11 +70,14 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
Map * newMap = MapManager::Instance().CreateMap(loc.mapid, GetPlayer());
|
||||
if (!newMap)
|
||||
{
|
||||
sLog.outCrash("map %d could not be created for player "UI64FMTD, loc.mapid, GetPlayer()->GetGUID());
|
||||
assert (false);
|
||||
sLog.outError("Map %d could not be created for player %d, porting player to homebind", loc.mapid, GetPlayer()->GetGUIDLow());
|
||||
GetPlayer()->RelocateToHomebind();
|
||||
newMap = MapManager::Instance().CreateMap(GetPlayer()->GetMapId(), GetPlayer());
|
||||
}
|
||||
else
|
||||
GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation);
|
||||
|
||||
GetPlayer()->SetMap(newMap);
|
||||
GetPlayer()->Relocate(loc.coord_x, loc.coord_y, loc.coord_z, loc.orientation);
|
||||
|
||||
GetPlayer()->SendInitialPacketsBeforeAddToMap();
|
||||
// the CanEnter checks are done in TeleporTo but conditions may change
|
||||
|
||||
@@ -2270,7 +2270,9 @@ enum CorpseDynFlags
|
||||
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_0s 6123
|
||||
#define SPELL_ID_AUTOSHOT 75 // used for checks in other spells interruption
|
||||
#define SPELL_ID_SHADOWMELD 58984 // used for check ignore stealth stance state
|
||||
|
||||
#define SPELL_ID_BLOOD_PRESENCE 48266 // Blood Presence
|
||||
#define SPELL_ID_FROST_PRESENCE 48263 // Frost Presence
|
||||
#define SPELL_ID_UNHOLY_PRESENCE 48265 // Unholy Presence
|
||||
enum WeatherType
|
||||
{
|
||||
WEATHER_TYPE_FINE = 0,
|
||||
|
||||
+99
-1
@@ -944,6 +944,101 @@ void Aura::ApplyAllModifiers(bool apply, bool Real)
|
||||
m_partAuras[i]->ApplyModifier(apply, Real);
|
||||
}
|
||||
|
||||
void Aura::HandleAuraSpecificMods(bool apply)
|
||||
{
|
||||
if (GetSpellSpecific(m_spellProto->Id) == SPELL_PRESENCE)
|
||||
{
|
||||
AuraEffect *bloodPresenceAura=0; // healing by damage done
|
||||
AuraEffect *frostPresenceAura=0; // increased health
|
||||
AuraEffect *unholyPresenceAura=0; // increased movement speed, faster rune recovery
|
||||
|
||||
// Improved Presences
|
||||
Unit::AuraEffectList const& vDummyAuras = m_target->GetAurasByType(SPELL_AURA_DUMMY);
|
||||
for(Unit::AuraEffectList::const_iterator itr = vDummyAuras.begin(); itr != vDummyAuras.end(); ++itr)
|
||||
{
|
||||
switch((*itr)->GetId())
|
||||
{
|
||||
// Improved Blood Presence
|
||||
case 50365:
|
||||
case 50371:
|
||||
{
|
||||
bloodPresenceAura = (*itr);
|
||||
break;
|
||||
}
|
||||
// Improved Frost Presence
|
||||
case 50384:
|
||||
case 50385:
|
||||
{
|
||||
frostPresenceAura = (*itr);
|
||||
break;
|
||||
}
|
||||
// Improved Unholy Presence
|
||||
case 50391:
|
||||
case 50392:
|
||||
{
|
||||
unholyPresenceAura = (*itr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint32 presence=GetId();
|
||||
if (apply)
|
||||
{
|
||||
// Blood Presence bonus
|
||||
if (presence == SPELL_ID_BLOOD_PRESENCE)
|
||||
m_target->CastSpell(m_target,63611,true);
|
||||
else if (bloodPresenceAura)
|
||||
{
|
||||
int32 basePoints1=bloodPresenceAura->GetAmount();
|
||||
m_target->CastCustomSpell(m_target,63611,NULL,&basePoints1,NULL,true,0,bloodPresenceAura);
|
||||
}
|
||||
// Frost Presence bonus
|
||||
if (presence == SPELL_ID_FROST_PRESENCE)
|
||||
m_target->CastSpell(m_target,61261,true);
|
||||
else if (frostPresenceAura)
|
||||
{
|
||||
int32 basePoints0=frostPresenceAura->GetAmount();
|
||||
m_target->CastCustomSpell(m_target,61261,&basePoints0,NULL,NULL,true,0,frostPresenceAura);
|
||||
}
|
||||
// Unholy Presence bonus
|
||||
if (presence == SPELL_ID_UNHOLY_PRESENCE)
|
||||
{
|
||||
if(unholyPresenceAura)
|
||||
{
|
||||
// Not listed as any effect, only base points set
|
||||
int32 basePoints0 = unholyPresenceAura->GetSpellProto()->EffectBasePoints[1];
|
||||
//m_target->CastCustomSpell(m_target,63622,&basePoints0 ,NULL,NULL,true,0,unholyPresenceAura);
|
||||
m_target->CastCustomSpell(m_target,65095,&basePoints0 ,NULL,NULL,true,0,unholyPresenceAura);
|
||||
}
|
||||
m_target->CastSpell(m_target,49772, true);
|
||||
}
|
||||
else if (unholyPresenceAura)
|
||||
{
|
||||
int32 basePoints0=unholyPresenceAura->GetAmount();
|
||||
m_target->CastCustomSpell(m_target,49772,&basePoints0,NULL,NULL,true,0,unholyPresenceAura);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// Remove passive auras
|
||||
if (presence == SPELL_ID_BLOOD_PRESENCE || bloodPresenceAura)
|
||||
m_target->RemoveAurasDueToSpell(63611);
|
||||
if (presence == SPELL_ID_FROST_PRESENCE || frostPresenceAura)
|
||||
m_target->RemoveAurasDueToSpell(61261);
|
||||
if (presence == SPELL_ID_UNHOLY_PRESENCE || unholyPresenceAura)
|
||||
{
|
||||
if(presence == SPELL_ID_UNHOLY_PRESENCE && unholyPresenceAura)
|
||||
{
|
||||
//m_target->RemoveAurasDueToSpell(63622);
|
||||
m_target->RemoveAurasDueToSpell(65095);
|
||||
}
|
||||
m_target->RemoveAurasDueToSpell(49772);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Aura::SendAuraUpdate()
|
||||
{
|
||||
if (m_auraSlot>=MAX_AURAS)
|
||||
@@ -1155,6 +1250,8 @@ void Aura::_AddAura()
|
||||
}
|
||||
|
||||
m_target->ApplyModFlag(UNIT_FIELD_AURASTATE, GetAuraStateMask(), true);
|
||||
|
||||
HandleAuraSpecificMods(true);
|
||||
}
|
||||
|
||||
bool Aura::SetPartAura(AuraEffect* aurEff, uint8 effIndex)
|
||||
@@ -1283,6 +1380,7 @@ void Aura::_RemoveAura()
|
||||
caster->ProcDamageAndSpell(m_target,ProcCaster, ProcVictim, procEx, m_procDamage, BASE_ATTACK, m_spellProto);
|
||||
}
|
||||
}
|
||||
HandleAuraSpecificMods(false);
|
||||
}
|
||||
|
||||
void Aura::SetStackAmount(uint8 stackAmount, bool applied)
|
||||
@@ -2504,7 +2602,7 @@ void AuraEffect::HandleAuraDummy(bool apply, bool Real, bool changeAmount)
|
||||
m_spellProto->SpellFamilyFlags[0] & 0x4)
|
||||
{
|
||||
// Must be casting target
|
||||
if (!m_target->IsNonMeleeSpellCasted(false))
|
||||
if (!m_target->IsNonMeleeSpellCasted(false, false, true))
|
||||
return;
|
||||
if (AuraEffect * aurEff = caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_WARRIOR, 2775, 0))
|
||||
{
|
||||
|
||||
@@ -119,6 +119,7 @@ class TRINITY_DLL_SPEC Aura
|
||||
m_target->HandleAuraEffect(m_partAuras[i], apply);
|
||||
}
|
||||
void ApplyAllModifiers(bool apply, bool Real=false);
|
||||
void HandleAuraSpecificMods(bool apply);
|
||||
|
||||
void Update(uint32 diff);
|
||||
|
||||
|
||||
@@ -452,8 +452,8 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||
|
||||
if (spellInfo->SpellFamilyFlags[0] & 0x11010002)
|
||||
return SPELL_BLESSING;
|
||||
|
||||
if ((spellInfo->SpellFamilyFlags[1] & 0x000008 || spellInfo->SpellFamilyFlags[0] & 0x20180400) && (spellInfo->AttributesEx3 & 0x200))
|
||||
// Judgement of Wisdom, Judgement of Light, Judgement of Justice
|
||||
if (spellInfo->Id == 20184 || spellInfo->Id == 20185 || spellInfo->Id == 20186)
|
||||
return SPELL_JUDGEMENT;
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
@@ -476,7 +476,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||
return spellmgr.GetSpellElixirSpecific(spellInfo->Id);
|
||||
|
||||
case SPELLFAMILY_DEATHKNIGHT:
|
||||
if ((spellInfo->Attributes & 0x10) && (spellInfo->AttributesEx2 & 0x10) && (spellInfo->AttributesEx4 & 0x200000))
|
||||
if (spellInfo->Id == SPELL_ID_BLOOD_PRESENCE || spellInfo->Id == SPELL_ID_FROST_PRESENCE || spellInfo->Id == SPELL_ID_UNHOLY_PRESENCE)
|
||||
return SPELL_PRESENCE;
|
||||
break;
|
||||
}
|
||||
|
||||
+2
-2
@@ -7531,8 +7531,8 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, AuraEffect* trig
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// Blood Presence
|
||||
else if (auraSpellInfo->Id == 48266)
|
||||
// Blood Presence (Improved)
|
||||
else if (auraSpellInfo->Id == 63611)
|
||||
{
|
||||
if (GetTypeId() != TYPEID_PLAYER)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user