Made it so global events don't get executed in duplicates to prevent unnecessary reprocessing of events that only need to be run once. This potentially reduces the total number of global events by hundreds, even thousands.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@14388 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
Paradox924X 2010-08-20 18:52:41 +00:00
parent 1ffca62da2
commit c076c81731
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,8 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2010/08/20
* Made it so global events don't get executed in duplicates to prevent unnecessary reprocessing of events that only need to be run once.
This potentially reduces the total number of global events by hundreds, even thousands. [Paradox924X]
* Added a few missing updates to the last packet update to properly support player clones and disguising. [Skotlex]
2010/08/19
* Rev. 14384 Follow up to r14383, changed use of clif_font_area to clif_font, seems Skotlex forgot them. [L0ne_W0lf]

View File

@ -282,7 +282,7 @@ int npc_event_doall_sub(DBKey key, void* data, va_list ap)
rid = va_arg(ap, int);
p = strchr(p, ':'); // match only the event name
if( p && strcmpi(name, p) == 0 )
if( p && strcmpi(name, p) == 0 && !ev->nd->src_id ) // Do not run on duplicates. [Paradox924X]
{
if(rid) // a player may only have 1 script running at the same time
npc_event_sub(map_id2sd(rid),ev,key.str);