diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-01 16:34:21 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2007-11-01 16:34:21 +0000 |
commit | 446724fb64fc64557ef4a2c63659359d7b6fb89f (patch) | |
tree | 4bbc801ba2603099dc475bb351b9df82cd20b19c /src | |
parent | a73973dde466fa25c118fca4da9acb7db2ee1666 (diff) | |
download | hercules-446724fb64fc64557ef4a2c63659359d7b6fb89f.tar.gz hercules-446724fb64fc64557ef4a2c63659359d7b6fb89f.tar.bz2 hercules-446724fb64fc64557ef4a2c63659359d7b6fb89f.tar.xz hercules-446724fb64fc64557ef4a2c63659359d7b6fb89f.zip |
Removed code that queues OnAgitEliminate after the Emperium is broken, this is now done properly by the gvg script instead (partially deals with bugreport:342).
If you have any extra castles, update your scripts accordingly.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11630 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/guild.c | 39 | ||||
-rw-r--r-- | src/map/guild.h | 1 | ||||
-rw-r--r-- | src/map/mob.c | 10 |
3 files changed, 1 insertions, 49 deletions
diff --git a/src/map/guild.c b/src/map/guild.c index 12577a8fd..c2738dc91 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -66,7 +66,6 @@ struct{ int guild_save_timer = -1; int guild_payexp_timer(int tid,unsigned int tick,int id,int data); -int guild_gvg_eliminate_timer(int tid,unsigned int tick,int id,int data); int guild_save_sub(int tid,unsigned int tick,int id,int data); static int guild_send_xy_timer(int tid,unsigned int tick,int id,int data); @@ -216,7 +215,6 @@ void do_init_guild(void) guild_read_guildskill_tree_db(); //guild skill tree [Komurka] - add_timer_func_list(guild_gvg_eliminate_timer,"guild_gvg_eliminate_timer"); add_timer_func_list(guild_payexp_timer,"guild_payexp_timer"); add_timer_func_list(guild_save_sub, "guild_save_sub"); add_timer_func_list(guild_send_xy_timer, "guild_send_xy_timer"); @@ -1882,27 +1880,6 @@ int guild_agit_end(void) return 0; } -int guild_gvg_eliminate_timer(int tid,unsigned int tick,int id,int data) -{ // Run One NPC_Event[OnAgitEliminate] - char *name = (char*)data; - size_t len = (name) ? strlen(name) : 0; - // the rest is dangerous, but let it crash, - // if this happens, it's ruined anyway - int c=0; - - if(agit_flag) // Agit not already End - { - char *evname=(char*)aMalloc( (len + 10) * sizeof(char)); - memcpy(evname,name,len - 5); - strcpy(evname + len - 5,"Eliminate"); - c = npc_event_do(evname); - ShowStatus("NPC_Event:[%s] Run (%d) Events.\n",evname,c); - aFree(evname); // [Lance] Should fix this - } - if(name) aFree(name); - return 0; -} - static int Ghp[MAX_GUILDCASTLE][MAX_GUARDIANS]; // so save only if HP are changed // experimental code [Yor] static int Gid[MAX_GUILDCASTLE]; int guild_save_sub(int tid,unsigned int tick,int id,int data) @@ -1928,22 +1905,6 @@ int guild_save_sub(int tid,unsigned int tick,int id,int data) return 0; } -int guild_agit_break(struct mob_data *md) -{ // Run One NPC_Event[OnAgitBreak] - char* evname; - - if(!agit_flag) return 0; // Agit already End - - evname = aStrdup(md->npc_event); -// Now By User to Run [OnAgitBreak] NPC Event... -// It's a little impossible to null point with player disconnect in this! -// But Script will be stop, so nothing... -// Maybe will be changed in the futher.. -// int c = npc_event_do(evname); - add_timer(gettick()+battle_config.gvg_eliminate_time,guild_gvg_eliminate_timer,md->bl.m,(int)evname); - return 0; -} - // How many castles does this guild have? int guild_checkcastles(struct guild *g) { diff --git a/src/map/guild.h b/src/map/guild.h index b7b5f2ac4..61c9e1778 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -89,7 +89,6 @@ int guild_castlealldataload(int len,struct guild_castle *gc); int guild_agit_start(void); int guild_agit_end(void); -int guild_agit_break(struct mob_data *md); void do_final_guild(void); diff --git a/src/map/mob.c b/src/map/mob.c index d202fd41a..88fad163f 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2189,14 +2189,6 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) //Emperium destroyed by script. Discard mvp character. [Skotlex] mvp_sd = NULL; - - // <Agit> NPC Event [OnAgitBreak] - if(md->npc_event[0] && strcmp(((md->npc_event)+strlen(md->npc_event)-13),"::OnAgitBreak") == 0) { - ShowNotice("MOB.C: Run NPC_Event[OnAgitBreak].\n"); - if (agit_flag == 1) //Call to Run NPC_Event[OnAgitBreak] - guild_agit_break(md); - } - if(src && src->type == BL_MOB){ struct mob_data *smd = (struct mob_data *)src; if(smd->nd) @@ -2317,7 +2309,7 @@ int mob_guardian_guildchange(struct block_list *bl,va_list ap) return 0; } - md->guardian_data->guild_id = md->guardian_data->castle->guild_id; + md->guardian_data->guild_id = g->guild_id; md->guardian_data->emblem_id = g->emblem_id; md->guardian_data->guardup_lv = guild_checkskill(g,GD_GUARDUP); memcpy(md->guardian_data->guild_name, g->name, NAME_LENGTH); |