Show
Ignore:
Timestamp:
11/19/08 13:44:45 (17 years ago)
Author:
yumileroy
Message:

[svn] Possession:
* Fixed player not having PvP flag on remove
* Fixed pet resetting its aggro on remove
* Fixed pet bar resetting on remove (?)
* Added dummy handler for NOT_ACTIVE_MOVER, display message only in debug logging mode

Original author: gvcoman
Date: 2008-11-07 16:49:42-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/game/Player.cpp

    r186 r189  
    1866118661    SetPossessedTarget(target); 
    1866218662 
     18663    uint32 flags1 = target->GetUInt32Value(UNIT_FIELD_FLAGS); 
     18664 
    1866318665    target->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction()); 
    1866418666    target->RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE); 
     
    1866818670    SetUInt64Value(PLAYER_FARSIGHT, target->GetGUID()); 
    1866918671 
     18672    uint32 flags2 = target->GetUInt32Value(UNIT_FIELD_FLAGS); 
     18673 
    1867018674    if(target->GetTypeId() == TYPEID_UNIT) 
    1867118675    { 
     
    1872118725    } 
    1872218726 
     18727    // Interrupt any current casting of the target 
     18728    if(target->IsNonMeleeSpellCasted(true)) 
     18729        target->InterruptNonMeleeSpells(true); 
     18730 
    1872318731    RemovePossessedTarget(); 
    1872418732 
     
    1874418752 
    1874518753    target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_UNKNOWN5); 
    18746     target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); 
    1874718754    RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE); 
    1874818755    SetUInt64Value(PLAYER_FARSIGHT, 0); 
     
    1875918766    else 
    1876018767    { 
     18768        target->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); 
    1876118769        if(((Creature*)target)->isPet()) 
    18762         { 
    18763             ((Pet*)target)->InitPetCreateSpells(); 
    1876418770            PetSpellInitialize(); 
    18765         } 
    18766  
    18767         if (target->isAlive()) 
     18771        else if (target->isAlive()) 
    1876818772        { 
    1876918773            // If we're still hostile to our target, continue attacking otherwise reset threat and go home 
    18770             if (target->getVictim()) 
    18771             { 
    18772                 Unit* victim = target->getVictim(); 
     18774            if (Unit* victim = target->getVictim()) 
     18775            { 
    1877318776                FactionTemplateEntry const* t_faction = target->getFactionTemplateEntry(); 
    1877418777                FactionTemplateEntry const* v_faction = victim->getFactionTemplateEntry(); 
     
    1878418787                } 
    1878518788            }  
    18786             else if (target->GetTypeId() == TYPEID_UNIT) 
     18789            else 
    1878718790            { 
    1878818791                target->GetMotionMaster()->Clear(); 
     
    1879118794             
    1879218795            // Add high amount of threat on the player 
    18793             if(target != GetPet() && attack) 
     18796            if(attack) 
    1879418797                target->AddThreat(this, 1000000.0f); 
    1879518798        }