mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge branch 'master' into 310
Conflicts: src/game/Level2.cpp src/game/PetHandler.cpp src/game/Player.cpp src/game/Player.h src/game/SkillHandler.cpp
This commit is contained in:
commit
31b3ee95ad
163 changed files with 5278 additions and 3233 deletions
|
|
@ -33,7 +33,6 @@
|
|||
#include "Unit.h"
|
||||
#include "Spell.h"
|
||||
#include "DynamicObject.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "Group.h"
|
||||
#include "UpdateData.h"
|
||||
#include "MapManager.h"
|
||||
|
|
@ -2045,7 +2044,7 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,std::list<Unit*> &TagUnitMap)
|
|||
}
|
||||
}
|
||||
else
|
||||
sLog.outError( "SPELL: unknown target coordinates for spell ID %u\n", m_spellInfo->Id );
|
||||
sLog.outError( "SPELL: unknown target coordinates for spell ID %u", m_spellInfo->Id );
|
||||
}break;
|
||||
case TARGET_BEHIND_VICTIM:
|
||||
{
|
||||
|
|
@ -3354,7 +3353,7 @@ uint8 Spell::CheckRuneCost(uint32 runeCostID)
|
|||
runeCost[i] = src->RuneCost[i];
|
||||
}
|
||||
|
||||
runeCost[RUNE_DEATH] = 0; // calculated later
|
||||
runeCost[RUNE_DEATH] = MAX_RUNES; // calculated later
|
||||
|
||||
for(uint32 i = 0; i < MAX_RUNES; ++i)
|
||||
{
|
||||
|
|
@ -3373,7 +3372,7 @@ uint8 Spell::CheckRuneCost(uint32 runeCostID)
|
|||
}
|
||||
}
|
||||
|
||||
if(runeCost[RUNE_DEATH] > 0)
|
||||
if(runeCost[RUNE_DEATH] > MAX_RUNES)
|
||||
return SPELL_FAILED_NO_POWER; // not sure if result code is correct
|
||||
|
||||
return 0;
|
||||
|
|
@ -3530,7 +3529,7 @@ void Spell::HandleEffects(Unit *pUnitTarget,Item *pItemTarget,GameObject *pGOTar
|
|||
EffectEnchantItemTmp(i);
|
||||
else
|
||||
{
|
||||
sLog.outError("SPELL: unknown effect %u spell id %u\n",
|
||||
sLog.outError("SPELL: unknown effect %u spell id %u",
|
||||
eff, m_spellInfo->Id);
|
||||
}
|
||||
}
|
||||
|
|
@ -3756,7 +3755,10 @@ uint8 Spell::CanCast(bool strict)
|
|||
return SPELL_FAILED_NOT_IN_ARENA;
|
||||
|
||||
// zone check
|
||||
if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(),
|
||||
uint32 zone, area;
|
||||
m_caster->GetZoneAndAreaId(zone,area);
|
||||
|
||||
if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),zone,area,
|
||||
m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster) : NULL))
|
||||
return res;
|
||||
|
||||
|
|
@ -4108,7 +4110,7 @@ uint8 Spell::CanCast(bool strict)
|
|||
|
||||
// In BattleGround players can use only flags and banners
|
||||
if( ((Player*)m_caster)->InBattleGround() &&
|
||||
!((Player*)m_caster)->isAllowUseBattleGroundObject() )
|
||||
!((Player*)m_caster)->CanUseBattleGroundObject() )
|
||||
return SPELL_FAILED_TRY_AGAIN;
|
||||
|
||||
// get the lock entry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue