Merge branch 'master' into 310

Conflicts:
	src/game/Unit.cpp
This commit is contained in:
tomrus88 2009-04-03 11:28:51 +04:00
commit 17d86309fa
22 changed files with 373 additions and 190 deletions

View file

@ -1773,7 +1773,7 @@ bool Player::TeleportTo(uint32 mapid, float x, float y, float z, float orientati
// if the player is saved before worldportack (at logout for example)
// this will be used instead of the current location in SaveToDB
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP);
RemoveAurasWithInterruptFlags(AURA_INTERRUPT_FLAG_CHANGE_MAP | AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING);
// move packet sent by client always after far teleport
// SetPosition(final_x, final_y, final_z, final_o, true);
@ -14384,15 +14384,17 @@ void Player::_LoadAuras(QueryResult *result, uint32 timediff)
else
remaincharges = 0;
//do not load single target auras (unless they were cast by the player)
if (caster_guid != GetGUID() && IsSingleTargetSpell(spellproto))
continue;
for(uint32 i=0; i<stackcount; i++)
{
Aura* aura = CreateAura(spellproto, effindex, NULL, this, NULL);
if(!damage)
damage = aura->GetModifier()->m_amount;
// reset stolen single target auras
if (caster_guid != GetGUID() && aura->IsSingleTarget())
aura->SetIsSingleTarget(false);
aura->SetLoadedState(caster_guid,damage,maxduration,remaintime,remaincharges);
AddAura(aura);
sLog.outDetail("Added aura spellid %u, effect %u", spellproto->Id, effindex);
@ -15422,7 +15424,7 @@ void Player::_SaveAuras()
if (!(itr2->second->IsPassive() || itr2->second->IsRemovedOnShapeLost()))
{
//do not save single target auras (unless they were cast by the player)
if (!(itr2->second->GetCasterGUID() != GetGUID() && IsSingleTargetSpell(spellInfo)))
if (!(itr2->second->GetCasterGUID() != GetGUID() && itr2->second->IsSingleTarget()))
{
uint8 i;
// or apply at cast SPELL_AURA_MOD_SHAPESHIFT or SPELL_AURA_MOD_STEALTH auras