*Update to Mangos 7154.
--HG-- branch : trunk
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <deque>
|
#include <deque>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
#include <cstdlib>
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
#include "direct.h"
|
#include "direct.h"
|
||||||
|
|||||||
@@ -930,7 +930,7 @@ void AchievementGlobalMgr::LoadAchievementCriteriaList()
|
|||||||
}
|
}
|
||||||
|
|
||||||
sLog.outString();
|
sLog.outString();
|
||||||
sLog.outErrorDb(">> Loaded 0 achievement criteria.",m_AchievementCriteriasByType->size());
|
sLog.outErrorDb(">> Loaded %u achievement criteria.",m_AchievementCriteriasByType->size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -130,7 +130,7 @@ class LootStore
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit LootStore(char const* name, char const* entryName, bool ratesAllowed)
|
explicit LootStore(char const* name, char const* entryName, bool ratesAllowed)
|
||||||
: m_name(name), m_entryName(entryName), m_ratesAllowed(m_ratesAllowed) {}
|
: m_name(name), m_entryName(entryName), m_ratesAllowed(ratesAllowed) {}
|
||||||
virtual ~LootStore() { Clear(); }
|
virtual ~LootStore() { Clear(); }
|
||||||
|
|
||||||
void Verify() const;
|
void Verify() const;
|
||||||
|
|||||||
+29
-2
@@ -19428,8 +19428,7 @@ void Player::SetClientControl(Unit* target, uint8 allowMove)
|
|||||||
void Player::UpdateZoneDependentAuras( uint32 newZone )
|
void Player::UpdateZoneDependentAuras( uint32 newZone )
|
||||||
{
|
{
|
||||||
// remove new continent flight forms
|
// remove new continent flight forms
|
||||||
uint32 v_map = GetVirtualMapForMapAndZone(GetMapId(), newZone);
|
if( !IsAllowUseFlyMountsHere() )
|
||||||
if( !isGameMaster() && v_map != 530 && v_map != 571)
|
|
||||||
{
|
{
|
||||||
RemoveSpellsCausingAura(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED);
|
RemoveSpellsCausingAura(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED);
|
||||||
RemoveSpellsCausingAura(SPELL_AURA_FLY);
|
RemoveSpellsCausingAura(SPELL_AURA_FLY);
|
||||||
@@ -20151,3 +20150,31 @@ uint32 Player::CalculateTalentsPoints() const
|
|||||||
|
|
||||||
return talentPointsForLevel;
|
return talentPointsForLevel;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Player::IsAllowUseFlyMountsHere() const
|
||||||
|
{
|
||||||
|
if (isGameMaster())
|
||||||
|
return true;
|
||||||
|
|
||||||
|
switch(GetVirtualMapForMapAndZone(GetMapId(), GetZoneId()))
|
||||||
|
{
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_AZEROTH))
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case 530:
|
||||||
|
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OUTLAND))
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
case 571:
|
||||||
|
if(!HasSpell(54197))
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OTHERS))
|
||||||
|
return false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2057,6 +2057,7 @@ class TRINITY_DLL_SPEC Player : public Unit
|
|||||||
|
|
||||||
bool CanFly() const { return HasUnitMovementFlag(MOVEMENTFLAG_CAN_FLY); }
|
bool CanFly() const { return HasUnitMovementFlag(MOVEMENTFLAG_CAN_FLY); }
|
||||||
bool IsFlying() const { return HasUnitMovementFlag(MOVEMENTFLAG_FLYING); }
|
bool IsFlying() const { return HasUnitMovementFlag(MOVEMENTFLAG_FLYING); }
|
||||||
|
bool IsAllowUseFlyMountsHere() const;
|
||||||
|
|
||||||
void HandleDrowning();
|
void HandleDrowning();
|
||||||
void HandleFallDamage(MovementInfo& movementInfo);
|
void HandleFallDamage(MovementInfo& movementInfo);
|
||||||
|
|||||||
+2
-26
@@ -4399,35 +4399,11 @@ uint8 Spell::CanCast(bool strict)
|
|||||||
case SPELL_AURA_FLY:
|
case SPELL_AURA_FLY:
|
||||||
{
|
{
|
||||||
// not allow cast fly spells at old maps by players (all spells is self target)
|
// not allow cast fly spells at old maps by players (all spells is self target)
|
||||||
if(m_caster->GetTypeId()==TYPEID_PLAYER && !((Player*)m_caster)->isGameMaster())
|
if(m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||||
{
|
{
|
||||||
uint32 v_map = GetVirtualMapForMapAndZone(m_caster->GetMapId(), m_caster->GetZoneId());
|
if( !((Player*)m_caster)->IsAllowUseFlyMountsHere() )
|
||||||
switch(v_map)
|
|
||||||
{
|
|
||||||
case 0:
|
|
||||||
case 1:
|
|
||||||
{
|
|
||||||
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_AZEROTH))
|
|
||||||
return SPELL_FAILED_NOT_HERE;
|
return SPELL_FAILED_NOT_HERE;
|
||||||
} break;
|
|
||||||
case 530:
|
|
||||||
{
|
|
||||||
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OUTLAND))
|
|
||||||
return SPELL_FAILED_NOT_HERE;
|
|
||||||
} break;
|
|
||||||
case 571:
|
|
||||||
{
|
|
||||||
if(!((Player*)m_caster)->HasSpell(54197))
|
|
||||||
return SPELL_FAILED_NOT_HERE;
|
|
||||||
} break;
|
|
||||||
default:
|
|
||||||
{
|
|
||||||
if (!sWorld.getConfig(CONFIG_FLYING_MOUNTS_OTHERS))
|
|
||||||
return SPELL_FAILED_NOT_HERE;
|
|
||||||
} break;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
case SPELL_AURA_PERIODIC_MANA_LEECH:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "7151"
|
#define REVISION_NR "7154"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|||||||
Reference in New Issue
Block a user