PlaneShift

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category
  • Assigned To No-one
  • Operating System
  • Severity Low
  • Priority
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: PlaneShift
Opened by Caarrie - 10.10.2008
Last edited by peeg - 11.10.2008

FS#2364 - /killnpc PID: ###

seems that /killnpc PID:### does not work
this code does not work as it is in adminmanager.cpp:4483

        obj = GEMSupervisor::GetSingleton().FindNPCEntity(atoi(data.target.Slice(4).GetDataSafe()));

but if it is changed to the following it does work

        obj = GEMSupervisor::GetSingleton().FindPlayerEntity(atoi(data.target.Slice(4).GetDataSafe()));

this is related to this code in gem.h

00300 gemActor *GEMSupervisor::FindPlayerEntity(int player_id)
00301 {
00302     return actors_by_pid.Get(player_id, NULL);
00303 }
00304 
00305 gemNPC *GEMSupervisor::FindNPCEntity(int npc_id)
00306 {
00307     return dynamic_cast<gemNPC*>(actors_by_pid.Get(npc_id, NULL));
00308 }
00309 
00310 gemItem *GEMSupervisor::FindItemEntity(int item_id)
00311 {
00312     return items_by_uid.Get(item_id, NULL);
00313 }
00314

seem the npc_id does not exist or is not valid to be used in this command

Closed by  peeg
11.10.2008 11:28
Reason for closing:  
Additional comments about closing:  

Fixed.

weltall commented on 10.10.2008 20:38

committed a fix to r2238

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing