aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/game/GuildHandler.cpp2
-rw-r--r--src/game/SharedDefines.h4
-rw-r--r--src/game/Spell.cpp4
-rw-r--r--src/game/SpellEffects.cpp2
-rw-r--r--src/game/SpellMgr.cpp10
-rw-r--r--src/game/SpellMgr.h3
-rw-r--r--src/game/Unit.cpp8
-rw-r--r--src/game/WorldSession.cpp4
-rw-r--r--src/shared/revision_nr.h2
9 files changed, 27 insertions, 12 deletions
diff --git a/src/game/GuildHandler.cpp b/src/game/GuildHandler.cpp
index ddacce78d11..94db5ad1ca1 100644
--- a/src/game/GuildHandler.cpp
+++ b/src/game/GuildHandler.cpp
@@ -375,7 +375,7 @@ void WorldSession::HandleGuildDemoteOpcode(WorldPacket& recvPacket)
guild->ChangeRank(plGuid, (slot->RankId+1));
// Put record into guildlog
- guild->LogGuildEvent(GUILD_EVENT_LOG_DEMOTE_PLAYER, GetPlayer()->GetGUIDLow(), GUID_LOPART(plGuid), (slot->RankId+1));
+ guild->LogGuildEvent(GUILD_EVENT_LOG_DEMOTE_PLAYER, GetPlayer()->GetGUIDLow(), GUID_LOPART(plGuid), slot->RankId);
WorldPacket data(SMSG_GUILD_EVENT, (2+30)); // guess size
data << (uint8)GE_DEMOTION;
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h
index b8a0f135ab7..4551473ed30 100644
--- a/src/game/SharedDefines.h
+++ b/src/game/SharedDefines.h
@@ -1977,6 +1977,7 @@ enum CorpseDynFlags
#define SPELL_ID_PASSIVE_RESURRECTION_SICKNESS 15007
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_5s 6119
#define SPELL_ID_WEAPON_SWITCH_COOLDOWN_1_0s 6123
+#define SPELL_ID_AUTOSHOT 75 // used for checks in other spells interruption
enum WeatherType
{
@@ -2145,7 +2146,8 @@ enum SummonType
SUMMON_TYPE_CRITTER3 = 307,
SUMMON_TYPE_UNKNOWN5 = 409,
SUMMON_TYPE_POSESSED3 = 427,
- SUMMON_TYPE_POSESSED2 = 428
+ SUMMON_TYPE_POSESSED2 = 428,
+ SUMMON_TYPE_GUARDIAN2 = 1161
};
enum ResponseCodes
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index d78db70b653..a2fd9bf6eaf 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -670,7 +670,7 @@ void Spell::prepareDataForTriggerSystem()
m_procAttacker = PROC_FLAG_SUCCESSFUL_POSITIVE_SPELL;
m_procVictim = PROC_FLAG_TAKEN_POSITIVE_SPELL;
}
- else if (m_spellInfo->Id == 5019) // Wands
+ else if (m_spellInfo->Id != SPELL_ID_AUTOSHOT) // Wands
{
m_procAttacker = PROC_FLAG_SUCCESSFUL_RANGED_SPELL_HIT;
m_procVictim = PROC_FLAG_TAKEN_RANGED_SPELL_HIT;
@@ -2424,7 +2424,7 @@ void Spell::SendSpellCooldown()
// shoot spells used equipped item cooldown values already assigned in GetAttackTime(RANGED_ATTACK)
// prevent 0 cooldowns set by another way
- if (rec <= 0 && catrec <= 0 && (cat == 76 || cat == 351))
+ if (rec <= 0 && catrec <= 0 && (cat == 76 || m_spellInfo->Id != SPELL_ID_AUTOSHOT))
rec = _player->GetAttackTime(RANGED_ATTACK);
// Now we have cooldown data (if found any), time to apply mods
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index 20924d1ef56..92fb4575746 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3189,6 +3189,8 @@ void Spell::EffectSummonType(uint32 i)
case SUMMON_TYPE_POSESSED2:
case SUMMON_TYPE_POSESSED3:
EffectSummonPossessed(i);
+ case SUMMON_TYPE_GUARDIAN2:
+ EffectSummonGuardian(i);
break;
case SUMMON_TYPE_WILD:
EffectSummonWild(i);
diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp
index 55c58730d0b..7cd5cae53e7 100644
--- a/src/game/SpellMgr.cpp
+++ b/src/game/SpellMgr.cpp
@@ -364,9 +364,9 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
if ((spellInfo->SpellFamilyFlags & 0x00000820180400LL) && (spellInfo->AttributesEx3 & 0x200))
return SPELL_JUDGEMENT;
- for (int i = 0; i < 3; i++) // TODO: fix it for WotLK!!!
+ for (int i = 0; i < 3; i++)
{
- // only paladin auras have this
+ // only paladin auras have this (for palaldin class family)
if (spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AREA_AURA_RAID)
return SPELL_AURA;
}
@@ -382,6 +382,11 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
case SPELLFAMILY_POTION:
return spellmgr.GetSpellElixirSpecific(spellInfo->Id);
+
+ case SPELLFAMILY_DEATHKNIGHT:
+ if ((spellInfo->Attributes & 0x10) && (spellInfo->AttributesEx2 & 0x10) && (spellInfo->AttributesEx4 & 0x200000))
+ return SPELL_PRESENCE;
+ break;
}
// only warlock armor/skin have this (in additional to family cases)
@@ -439,6 +444,7 @@ bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2)
case SPELL_MAGE_ARMOR:
case SPELL_ELEMENTAL_SHIELD:
case SPELL_MAGE_POLYMORPH:
+ case SPELL_PRESENCE:
case SPELL_WELL_FED:
case SPELL_DRINK:
case SPELL_FOOD:
diff --git a/src/game/SpellMgr.h b/src/game/SpellMgr.h
index e65d0bb9681..08bea55298f 100644
--- a/src/game/SpellMgr.h
+++ b/src/game/SpellMgr.h
@@ -308,7 +308,8 @@ enum SpellSpecific
SPELL_WARLOCK_CORRUPTION= 17,
SPELL_WELL_FED = 18,
SPELL_DRINK = 19,
- SPELL_FOOD = 20
+ SPELL_FOOD = 20,
+ SPELL_PRESENCE = 21,
};
SpellSpecific GetSpellSpecific(uint32 spellId);
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 2f10c3658bb..1041d69318c 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -2925,7 +2925,7 @@ void Unit::_UpdateAutoRepeatSpell()
if ( (GetTypeId() == TYPEID_PLAYER && ((Player*)this)->isMoving()) || IsNonMeleeSpellCasted(false,false,true) )
{
// cancel wand shoot
- if(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351)
+ if(m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != SPELL_ID_AUTOSHOT)
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
m_AutoRepeatFirstCast = true;
return;
@@ -2978,7 +2978,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] )
{
// break autorepeat if not Auto Shot
- if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351)
+ if (m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != SPELL_ID_AUTOSHOT)
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
m_AutoRepeatFirstCast = true;
}
@@ -2993,7 +2993,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
// it also does break autorepeat if not Auto Shot
if ( m_currentSpells[CURRENT_AUTOREPEAT_SPELL] &&
- m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Category == 351 )
+ m_currentSpells[CURRENT_AUTOREPEAT_SPELL]->m_spellInfo->Id != SPELL_ID_AUTOSHOT )
InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
addUnitState(UNIT_STAT_CASTING);
} break;
@@ -3001,7 +3001,7 @@ void Unit::SetCurrentCastedSpell( Spell * pSpell )
case CURRENT_AUTOREPEAT_SPELL:
{
// only Auto Shoot does not break anything
- if (pSpell->m_spellInfo->Category == 351)
+ if (pSpell->m_spellInfo->Id != SPELL_ID_AUTOSHOT)
{
// generic autorepeats break generic non-delayed and channeled non-delayed spells
InterruptSpell(CURRENT_GENERIC_SPELL,false);
diff --git a/src/game/WorldSession.cpp b/src/game/WorldSession.cpp
index d49fe1cda83..4697216c5dc 100644
--- a/src/game/WorldSession.cpp
+++ b/src/game/WorldSession.cpp
@@ -310,6 +310,10 @@ void WorldSession::LogoutPlayer(bool Save)
if(_player->InBattleGround())
_player->LeaveBattleground();
+ ///- Teleport to home if the player is in an invalid instance
+ if(!_player->m_InstanceValid && !_player->isGameMaster())
+ _player->TeleportTo(_player->m_homebindMapId, _player->m_homebindX, _player->m_homebindY, _player->m_homebindZ, _player->GetOrientation());
+
sOutdoorPvPMgr.HandlePlayerLeaveZone(_player,_player->GetZoneId());
for (int i=0; i < PLAYER_MAX_BATTLEGROUND_QUEUES; i++)
diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h
index 299924ce0a8..328f7d8c558 100644
--- a/src/shared/revision_nr.h
+++ b/src/shared/revision_nr.h
@@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
- #define REVISION_NR "6967"
+ #define REVISION_NR "6973"
#endif // __REVISION_NR_H__