mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
Merge commit 'origin/master' into 310 (at [7360])
This commit is contained in:
commit
ce8bd43bef
69 changed files with 2352 additions and 1751 deletions
|
|
@ -321,7 +321,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
|||
if((m_caster->getClassMask() & CLASSMASK_WAND_USERS) != 0 && m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
{
|
||||
if(Item* pItem = ((Player*)m_caster)->GetWeaponForAttack(RANGED_ATTACK))
|
||||
m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetProto()->Damage->DamageType);
|
||||
m_spellSchoolMask = SpellSchoolMask(1 << pItem->GetProto()->Damage[0].DamageType);
|
||||
}
|
||||
}
|
||||
// Set health leech amount to zero
|
||||
|
|
@ -2542,7 +2542,7 @@ void Spell::SendSpellCooldown()
|
|||
ItemPrototype const* proto = m_CastItem->GetProto();
|
||||
if(proto)
|
||||
{
|
||||
for(int idx = 0; idx < 5; ++idx)
|
||||
for(int idx = 0; idx < MAX_ITEM_PROTO_SPELLS; ++idx)
|
||||
{
|
||||
if(proto->Spells[idx].SpellId == m_spellInfo->Id)
|
||||
{
|
||||
|
|
@ -3324,7 +3324,7 @@ void Spell::TakeCastItem()
|
|||
bool expendable = false;
|
||||
bool withoutCharges = false;
|
||||
|
||||
for (int i = 0; i<5; i++)
|
||||
for (int i = 0; i < MAX_ITEM_PROTO_SPELLS; ++i)
|
||||
{
|
||||
if (proto->Spells[i].SpellId)
|
||||
{
|
||||
|
|
@ -3824,8 +3824,8 @@ uint8 Spell::CanCast(bool strict)
|
|||
return SPELL_FAILED_NOT_IN_ARENA;
|
||||
|
||||
// zone check
|
||||
if (uint8 res= GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(),
|
||||
m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster)->GetBattleGroundId() : 0))
|
||||
if (uint8 res= spellmgr.GetSpellAllowedInLocationError(m_spellInfo,m_caster->GetMapId(),m_caster->GetZoneId(),m_caster->GetAreaId(),
|
||||
m_caster->GetTypeId()==TYPEID_PLAYER ? ((Player*)m_caster) : NULL))
|
||||
return res;
|
||||
|
||||
// not let players cast spells at mount (and let do it to creatures)
|
||||
|
|
@ -4998,7 +4998,7 @@ uint8 Spell::CheckItems()
|
|||
ItemPrototype const *proto = m_CastItem->GetProto();
|
||||
if(!proto)
|
||||
return SPELL_FAILED_ITEM_NOT_READY;
|
||||
for(int s=0;s<5;s++)
|
||||
for(int s=0; s < MAX_ITEM_PROTO_SPELLS; ++s)
|
||||
{
|
||||
// CastItem will be used up and does not count as reagent
|
||||
int32 charges = m_CastItem->GetSpellCharges(s);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue