@ -25,11 +25,10 @@ namespace mwmp
void Do ( PlayerPacket & packet , Player & player ) override
void Do ( PlayerPacket & packet , Player & player ) override
{
{
LOG_MESSAGE_SIMPLE ( Log : : LOG_INFO , " Received %s from %s " , strPacketID . c_str ( ) , player . npc . mName . c_str ( ) ) ;
LOG_MESSAGE_SIMPLE ( Log : : LOG_INFO , " Received %s from %s " , strPacketID . c_str ( ) , player . npc . mName . c_str ( ) ) ;
if ( ! player . creatureStats . mDead )
{
LOG_APPEND ( Log : : LOG_INFO , " - Moved to %s " , player . cell . getDescription ( ) . c_str ( ) ) ;
LOG_APPEND ( Log : : LOG_INFO , " - Moved to %s " , player . cell . getDescription ( ) . c_str ( ) ) ;
Script : : Call < Script : : CallbackIdentity ( " OnPlayerCellChange " ) > ( player . getId ( ) ) ;
player . exchangeFullInfo = true ;
player . exchangeFullInfo = true ;
player . forEachLoaded ( [ this ] ( Player * pl , Player * other ) {
player . forEachLoaded ( [ this ] ( Player * pl , Player * other ) {
@ -78,15 +77,10 @@ namespace mwmp
packet . setPlayer ( & player ) ;
packet . setPlayer ( & player ) ;
packet . Send ( true ) ; //send to other clients
packet . Send ( true ) ; //send to other clients
Script : : Call < Script : : CallbackIdentity ( " OnPlayerCellChange " ) > ( player . getId ( ) ) ;
LOG_APPEND ( Log : : LOG_INFO , " - Finished processing ID_PLAYER_CELL_CHANGE " , player . cell . getDescription ( ) . c_str ( ) ) ;
LOG_APPEND ( Log : : LOG_INFO , " - Finished processing ID_PLAYER_CELL_CHANGE " , player . cell . getDescription ( ) . c_str ( ) ) ;
player . exchangeFullInfo = false ;
player . exchangeFullInfo = false ;
}
}
else
LOG_APPEND ( Log : : LOG_INFO , " - Ignored because %s is dead " , player . npc . mName . c_str ( ) ) ;
}
} ;
} ;
}
}