UINT GCDelObjectHandler::Execute(GCDelObject* pPacket, Player* pPlayer) { SMITH::Agent* pAgent = (SMITH::Agent*)pPlayer; if( pPacket ) { int nObj = pAgent->getObjectManager()->findServerObject( (INT)pPacket->getObjID() ); if( nObj != -1 ) { pAgent->getObjectManager()->destroyObject( nObj ); } else { nObj = pAgent->getObjectManager()->findServerObject( (INT)pPacket->getObjID() ); } //pAgent->getObjectManager()->destroyObject( (INT)pPacket->getObjID() ); } return PACKET_EXE_CONTINUE; }
UINT GCNewPlayer_MoveHandler::Execute(GCNewPlayer_Move* pPacket, Player* pPlayer) { //return PACKET_EXE_CONTINUE; SMITH::Agent* pAgent = (SMITH::Agent*)pPlayer; if( pPacket ) { pAgent->getObjectManager()->createObject( OT_PLAYEROTHER, (INT)pPacket->GetObjID() ); //char szCommand[1024]; //sprintf( szCommand, "New_Player_IN(\"%d\")", (INT)pPacket->getObjID() ); //pAgent->getLuaState()->DoString(szCommand); //CGCharAskBaseAttrib msg; //msg.setTargetID((INT)pPacket->getObjID()); //pAgent->getNetManager()->sendPacket(&msg); } return PACKET_EXE_CONTINUE; }