mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-16 04:59:41 -04:00
*Use #defines instead of spellids for often used spells.
*Make recently broken talent Improved Healthstone work again - by iadus3. --HG-- branch : trunk
This commit is contained in:
@@ -757,8 +757,8 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
|
||||
{
|
||||
// not blizz like, we must correctly save and load player instead...
|
||||
if(pCurrChar->getRace() == RACE_NIGHTELF)
|
||||
pCurrChar->CastSpell(pCurrChar, 20584, true, 0);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
|
||||
pCurrChar->CastSpell(pCurrChar, 8326, true, 0); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
|
||||
pCurrChar->CastSpell(pCurrChar, SPELL_ID_NE_GHOST, true, 0);// auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
|
||||
pCurrChar->CastSpell(pCurrChar, SPELL_ID_GHOST, true, 0); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
|
||||
|
||||
pCurrChar->SetMovement(MOVE_WATER_WALK);
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ void WorldSession::HandleMoveWorldportAckOpcode()
|
||||
|
||||
// honorless target
|
||||
if(GetPlayer()->pvpInfo.inHostileArea)
|
||||
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
|
||||
GetPlayer()->CastSpell(GetPlayer(), SPELL_ID_HONORLESS_TARGET, true);
|
||||
|
||||
// resummon pet
|
||||
GetPlayer()->ResummonPetTemporaryUnSummonedIfAny();
|
||||
@@ -203,7 +203,7 @@ void WorldSession::HandleMoveTeleportAck(WorldPacket& recv_data)
|
||||
{
|
||||
// honorless target
|
||||
if(plMover->pvpInfo.inHostileArea)
|
||||
plMover->CastSpell(plMover, 2479, true);
|
||||
plMover->CastSpell(plMover, SPELL_ID_HONORLESS_TARGET, true);
|
||||
}
|
||||
|
||||
// resummon pet
|
||||
|
||||
@@ -1911,7 +1911,7 @@ void Player::ProcessDelayedOperations()
|
||||
|
||||
if(m_DelayedOperations & DELAYED_SPELL_CAST_DESERTER)
|
||||
{
|
||||
CastSpell(this, 26013, true); // Deserter
|
||||
CastSpell(this, SPELL_ID_DESERTER, true); // Deserter
|
||||
}
|
||||
|
||||
//we have executed ALL delayed ops, so clear the flag
|
||||
@@ -4168,8 +4168,8 @@ void Player::BuildPlayerRepop()
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
if(getRace() == RACE_NIGHTELF)
|
||||
CastSpell(this, 20584, true); // auras SPELL_AURA_INCREASE_SPEED(+speed in wisp form), SPELL_AURA_INCREASE_SWIM_SPEED(+swim speed in wisp form), SPELL_AURA_TRANSFORM (to wisp form)
|
||||
CastSpell(this, 8326, true); // auras SPELL_AURA_GHOST, SPELL_AURA_INCREASE_SPEED(why?), SPELL_AURA_INCREASE_SWIM_SPEED(why?)
|
||||
CastSpell(this, SPELL_ID_NE_GHOST, true);
|
||||
CastSpell(this, SPELL_ID_GHOST, true);
|
||||
|
||||
// there must be SMSG.FORCE_RUN_SPEED_CHANGE, SMSG.FORCE_SWIM_SPEED_CHANGE, SMSG.MOVE_WATER_WALK
|
||||
// there must be SMSG.STOP_MIRROR_TIMER
|
||||
@@ -4238,8 +4238,8 @@ void Player::ResurrectPlayer(float restore_percent, bool applySickness)
|
||||
// remove death flag + set aura
|
||||
SetByteValue(UNIT_FIELD_BYTES_1, 3, 0x00);
|
||||
if(getRace() == RACE_NIGHTELF)
|
||||
RemoveAurasDueToSpell(20584); // speed bonuses
|
||||
RemoveAurasDueToSpell(8326); // SPELL_AURA_GHOST
|
||||
RemoveAurasDueToSpell(SPELL_ID_NE_GHOST); // speed bonuses
|
||||
RemoveAurasDueToSpell(SPELL_ID_GHOST); // SPELL_AURA_GHOST
|
||||
|
||||
setDeathState(ALIVE);
|
||||
|
||||
@@ -18510,7 +18510,7 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
|
||||
return;
|
||||
}
|
||||
|
||||
CastSpell(this, 26013, true); // Deserter
|
||||
CastSpell(this, SPELL_ID_DESERTER, true); // Deserter
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18519,7 +18519,7 @@ void Player::LeaveBattleground(bool teleportToEntryPoint)
|
||||
bool Player::CanJoinToBattleground() const
|
||||
{
|
||||
// check Deserter debuff
|
||||
if(HasAura(26013))
|
||||
if(HasAura(SPELL_ID_DESERTER))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
@@ -18978,7 +18978,7 @@ void Player::SendInitialPacketsAfterAddToMap()
|
||||
data << uint32(0x00000000); // on blizz it increments periodically
|
||||
GetSession()->SendPacket(&data);
|
||||
|
||||
CastSpell(this, 836, true); // LOGINEFFECT
|
||||
CastSpell(this, SPELL_ID_LOGINEFFECT, true); // LOGINEFFECT
|
||||
|
||||
// set some aura effects that send packet to player client after add player to map
|
||||
// SendMessageToSet not send it to player not it map, only for aura that not changed anything at re-apply
|
||||
|
||||
@@ -328,7 +328,7 @@ enum ItemQualities
|
||||
#define SPELL_ATTR_EX3_UNK13 0x00002000 // 13
|
||||
#define SPELL_ATTR_EX3_UNK14 0x00004000 // 14 "Honorless Target" only this spells have this flag
|
||||
#define SPELL_ATTR_EX3_UNK15 0x00008000 // 15 Auto Shoot, Shoot, Throw, - this is autoshot flag
|
||||
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell??
|
||||
#define SPELL_ATTR_EX3_UNK16 0x00010000 // 16 no triggers effects that trigger on casting a spell?? (15290 - 2.2ptr change)
|
||||
#define SPELL_ATTR_EX3_NO_INITIAL_AGGRO 0x00020000 // 17 Soothe Animal, 39758, Mind Soothe
|
||||
#define SPELL_ATTR_EX3_UNK18 0x00040000 // 18
|
||||
#define SPELL_ATTR_EX3_DISABLE_PROC 0x00080000 // 19 during aura proc no spells can trigger (20178, 20375)
|
||||
@@ -2282,6 +2282,12 @@ enum CorpseDynFlags
|
||||
#define SPELL_ID_BLOOD_PRESENCE 48266 // Blood Presence
|
||||
#define SPELL_ID_FROST_PRESENCE 48263 // Frost Presence
|
||||
#define SPELL_ID_UNHOLY_PRESENCE 48265 // Unholy Presence
|
||||
#define SPELL_ID_NE_GHOST 20584 // Night Elf Ghost Aura
|
||||
#define SPELL_ID_GHOST 8326 // Ghost
|
||||
#define SPELL_ID_DESERTER 26013 // Deserter
|
||||
#define SPELL_ID_LOGINEFFECT 836 // LOGINEFFECT
|
||||
#define SPELL_ID_HONORLESS_TARGET 2479 // Honorless target
|
||||
|
||||
enum WeatherType
|
||||
{
|
||||
WEATHER_TYPE_FINE = 0,
|
||||
|
||||
@@ -5218,17 +5218,11 @@ void Spell::EffectScriptEffect(uint32 effIndex)
|
||||
if (AuraEffect const * aurEff = unitTarget->GetDummyAura(SPELLFAMILY_WARLOCK, 284, 0))
|
||||
{
|
||||
if(aurEff->GetId() == 18692)
|
||||
{
|
||||
rank = 1;
|
||||
break;
|
||||
}
|
||||
else if(aurEff->GetId() == 18693)
|
||||
{
|
||||
rank = 2;
|
||||
break;
|
||||
}
|
||||
else
|
||||
sLog.outError("Unknown rank of Improved Healthstone id: %f", aurEff->GetId());
|
||||
sLog.outError("Unknown rank of Improved Healthstone id: %d", aurEff->GetId());
|
||||
}
|
||||
|
||||
static uint32 const itypes[8][3] = {
|
||||
|
||||
@@ -497,7 +497,6 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||
return SPELL_SCROLL;
|
||||
case 12880: // Enrage (Enrage)
|
||||
case 57518: // Enrage (Wrecking Crew)
|
||||
case 12292: // Death Wish
|
||||
return SPELL_WARRIOR_ENRAGE;
|
||||
}
|
||||
}
|
||||
@@ -528,8 +527,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||
}
|
||||
case SPELLFAMILY_WARRIOR:
|
||||
{
|
||||
if (spellInfo->SpellFamilyFlags[1] & 0x000080 || spellInfo->SpellFamilyFlags[0] & 0x10000LL)
|
||||
if (spellInfo->SpellFamilyFlags[1] & 0x000080 || spellInfo->SpellFamilyFlags[0] & 0x10000)
|
||||
return SPELL_POSITIVE_SHOUT;
|
||||
if (spellInfo->Id == 12292) // Death Wish
|
||||
return SPELL_WARRIOR_ENRAGE;
|
||||
|
||||
break;
|
||||
}
|
||||
@@ -716,7 +717,6 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
|
||||
case 34700: // Allergic Reaction
|
||||
case 31719: // Suspension
|
||||
case 61987: // Avenging Wrath Marker
|
||||
case 11196: // Recently Bandadged
|
||||
case 50524: // Runic Power Feed
|
||||
return false;
|
||||
case 12042: // Arcane Power
|
||||
@@ -767,14 +767,6 @@ bool SpellMgr::_isPositiveEffect(uint32 spellId, uint32 effIndex, bool deep) con
|
||||
case 38639: // Nether Exhaustion (blue)
|
||||
case 11196: // Recently Bandaged
|
||||
return false;
|
||||
// some spells have unclear target modes for selection, so just make effect positive
|
||||
case 27184:
|
||||
case 27190:
|
||||
case 27191:
|
||||
case 27201:
|
||||
case 27202:
|
||||
case 27203:
|
||||
return true;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -996,12 +988,6 @@ bool IsSingleTargetSpell(SpellEntry const *spellInfo)
|
||||
break;
|
||||
}
|
||||
|
||||
// single target triggered spell.
|
||||
// Not real client side single target spell, but it' not triggered until prev. aura expired.
|
||||
// This is allow store it in single target spells list for caster for spell proc checking
|
||||
if(spellInfo->Id==38324) // Regeneration (triggered by 38299 (HoTs on Heals))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2731,12 +2717,9 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||
break;
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
// Frostbite 0x80000000
|
||||
// Frostbite
|
||||
if (spellproto->SpellFamilyFlags[1] & 0x80000000)
|
||||
return DIMINISHING_TRIGGER_ROOT;
|
||||
// Frost Nova / Freeze (Water Elemental)
|
||||
else if (spellproto->SpellIconID == 193)
|
||||
return DIMINISHING_CONTROL_ROOT;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_ROGUE:
|
||||
@@ -2776,7 +2759,7 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
|
||||
// Cyclone
|
||||
else if (spellproto->SpellFamilyFlags[1] & 0x20)
|
||||
return DIMINISHING_CYCLONE;
|
||||
//Entangling Roots: to force natures grasp proc to be control root
|
||||
// Entangling Roots: to force natures grasp proc to be control root
|
||||
else if (spellproto->SpellFamilyFlags[0] & 0x00000200)
|
||||
return DIMINISHING_CONTROL_ROOT;
|
||||
// Faerie Fire
|
||||
@@ -2863,35 +2846,35 @@ int32 GetDiminishingReturnsLimitDuration(DiminishingGroup group, SpellEntry cons
|
||||
{
|
||||
// Wyvern Sting
|
||||
if (spellproto->SpellFamilyFlags[1] & 0x1000)
|
||||
return 6000;
|
||||
return 6 * IN_MILISECONDS;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
{
|
||||
// Repentance - limit to 6 seconds in PvP
|
||||
if (spellproto->SpellFamilyFlags[0] & 0x4)
|
||||
return 6000;
|
||||
return 6 * IN_MILISECONDS;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_DRUID:
|
||||
{
|
||||
// Faerie Fire - limit to 40 seconds in PvP (3.1)
|
||||
if (spellproto->SpellFamilyFlags[0] & 0x400)
|
||||
return 40000;
|
||||
return 40 * IN_MILISECONDS;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PRIEST:
|
||||
{
|
||||
// Vampiric Embrace - limit to 60 seconds in PvP (3.1)
|
||||
if ((spellproto->SpellFamilyFlags[0] & 0x4) && spellproto->SpellIconID == 150)
|
||||
return 60000;
|
||||
return 60 * IN_MILISECONDS;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return 10000;
|
||||
return 10 * IN_MILISECONDS;
|
||||
}
|
||||
|
||||
bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group)
|
||||
@@ -3506,21 +3489,6 @@ void SpellMgr::LoadSpellCustomAttr()
|
||||
if(!spellInfo)
|
||||
continue;
|
||||
|
||||
bool auraSpell = true;
|
||||
for(uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
if(spellInfo->Effect[j])
|
||||
if(spellInfo->Effect[j] != SPELL_EFFECT_APPLY_AURA
|
||||
|| SpellTargetType[spellInfo->EffectImplicitTargetA[j]] != TARGET_TYPE_UNIT_TARGET)
|
||||
//ignore target party for now
|
||||
{
|
||||
auraSpell = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(auraSpell)
|
||||
mSpellCustomAttr[i] |= SPELL_ATTR_CU_AURA_SPELL;
|
||||
|
||||
for(uint32 j = 0; j < 3; ++j)
|
||||
{
|
||||
switch(spellInfo->EffectApplyAuraName[j])
|
||||
|
||||
Reference in New Issue
Block a user