Advertisement
Terrah

easy

Oct 9th, 2015
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.90 KB | None | 0 0
  1. void CNWNXAreas::DestoryObject(CNWSObject * obj){
  2.  
  3.     CNWSArea * are = obj->GetArea();
  4.  
  5.     if (are){
  6.         are->RemoveObjectFromArea(obj->obj_generic.obj_id);    
  7.     }
  8.  
  9.     obj->SetArea(NULL);
  10.    
  11.     CWorldTimer * time = (*NWN_AppManager)->app_server->GetWorldTimer();
  12.     DWORD seconds = time->GetWorldTimeSecond();
  13.     DWORD days = time->GetCalendarDayFromSeconds(seconds);
  14.     CServerAIMaster * bitch = (*NWN_AppManager)->app_server->GetServerAIMaster();
  15.     DWORD event = *(DWORD *)0x00633990; //CServerAIMaster__EVENT_DESTROY_OBJECT
  16.  
  17.     bitch->AddEventDeltaTime(seconds, days, obj->obj_generic.obj_id, obj->obj_generic.obj_id, event, 0);
  18.  
  19.     /*void(__fastcall *pDestructor)(CNWSObject *pTHIS, void *pVOID, int flag) = (void(__fastcall*)(CNWSObject *pTHIS, void *pVOID, int flag))(*(DWORD*)((DWORD*)(obj->obj_generic.obj_type)));
  20.     pDestructor(obj, NULL, 1);*/
  21.  
  22.     //(**(void(__thiscall ***)(CNWSObject*, DWORD))obj)(obj, 1);
  23.  
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement