View Single Post
  #4  
Old 03-20-2002, 05:55 AM
Merkur
Sarnak
 
Join Date: Mar 2002
Posts: 53
Default Re: 0.2.5 Bug in Process(), AddHateToNPC() ?

Quote:
Originally Posted by ScotchTape

* AddHateToNPC() I think could use some tweaking. In that bulk of code is an else, translates to (!Npc->IsEngaged()), that is being called whenever an NPC is not engaged. Someone has a comment in there to the effect of //heal buddy or some such, and well I'm telling you, that by default all NPCs are not engaged, so I wouldn't think that to be a good idea to put anything in there. I'm also trying to figure out, maybe someone could enlighten me, as to why AddHateToNPC() is being called at the char select screen and even after the client has disconnected up until zone sleep?

TIA

-ST
Because its in the NPC Process(). Every NPC scans for foes or friends evertime. The procedures for friends are not in yet, so don't say that would be bad .
BTW this function does not send any packet to the client so it does not cause any lag cleintside. But of course it uses some CPU time and bandwith to your SQL Server (which should be local).
If you want this function to use less CPU Time set scanarea_timer up, its currently 500 ms (that means every NPCs will run this procedure every 500 ms)

im going to update this procedure soon though to reduce the sql querys
Reply With Quote