- Added a wrapper to delete_timer so it prints out from where the invocation was done.

- Fixed some unsigned warnings.
- Fixed Splash attacks consuming 2 ammo on each attack.


git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@9718 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
skotlex 2007-01-26 18:49:46 +00:00
parent 335723f839
commit d65e051707
7 changed files with 15 additions and 8 deletions

View File

@ -4,6 +4,9 @@ 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. IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2007/01/26 2007/01/26
* Added a wrapper to delete_timer so it prints out from where the
invocation was done.
* Fixed Splash attacks consuming 2 ammo on each attack. [Skotlex]
* Added some more freedom for the txt log paths since 32 wasn't enough * Added some more freedom for the txt log paths since 32 wasn't enough
* Removed log_uptime that was accidentally introduced in r1208 [ultramage] * Removed log_uptime that was accidentally introduced in r1208 [ultramage]
2007/01/24 2007/01/24

View File

@ -183,9 +183,7 @@ int mapif_load_homunculus(int fd){
homun_pt->hunger = 0; homun_pt->hunger = 0;
else if(homun_pt->hunger > 100) else if(homun_pt->hunger > 100)
homun_pt->hunger = 100; homun_pt->hunger = 100;
if(homun_pt->intimacy < 0) if(homun_pt->intimacy > 100000)
homun_pt->intimacy = 0;
else if(homun_pt->intimacy > 100000)
homun_pt->intimacy = 100000; homun_pt->intimacy = 100000;
mysql_free_result(sql_res); mysql_free_result(sql_res);

View File

@ -346,7 +346,8 @@ void plugins_init(void)
export_symbol(addr_, SYMBOL_ADDR); export_symbol(addr_, SYMBOL_ADDR);
// timers // timers
export_symbol(get_uptime, SYMBOL_GET_UPTIME); export_symbol(get_uptime, SYMBOL_GET_UPTIME);
export_symbol(delete_timer, SYMBOL_DELETE_TIMER); // export_symbol(delete_timer, SYMBOL_DELETE_TIMER);
export_symbol(delete_timer_sub, SYMBOL_DELETE_TIMER);
export_symbol(add_timer_func_list, SYMBOL_ADD_TIMER_FUNC_LIST); export_symbol(add_timer_func_list, SYMBOL_ADD_TIMER_FUNC_LIST);
export_symbol(add_timer_interval, SYMBOL_ADD_TIMER_INTERVAL); export_symbol(add_timer_interval, SYMBOL_ADD_TIMER_INTERVAL);
export_symbol(add_timer, SYMBOL_ADD_TIMER); export_symbol(add_timer, SYMBOL_ADD_TIMER);

View File

@ -1076,7 +1076,7 @@ int RFIFOSKIP(int fd,int len)
s = session[fd]; s = session[fd];
if ( s->rdata_size - s->rdata_pos - len < 0 ) { if ( s->rdata_size < s->rdata_pos + len ) {
//fprintf(stderr,"too many skip\n"); //fprintf(stderr,"too many skip\n");
//exit(1); //exit(1);
//better than a COMPLETE program abort // TEST! :) //better than a COMPLETE program abort // TEST! :)

View File

@ -270,10 +270,12 @@ int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int
return tid; return tid;
} }
int delete_timer(int id, TimerFunc func) //int delete_timer(int id, TimerFunc func)
int delete_timer_sub(int id, TimerFunc func, const char* file, int line)
{ {
if (id <= 0 || id >= timer_data_num) { if (id <= 0 || id >= timer_data_num) {
ShowError("delete_timer error : no such timer %d (%08x(%s))\n", id, (int)func, search_timer_func_list(func)); //ShowError("delete_timer error : no such timer %d (%08x(%s))\n", id, (int)func, search_timer_func_list(func));
ShowError("delete_timer error : no such timer %d (%08x(%s)), invoked from %s:%d\n", id, (int)func, search_timer_func_list(func), file, line);
return -1; return -1;
} }
if (timer_data[id].func != func) { if (timer_data[id].func != func) {

View File

@ -41,7 +41,9 @@ unsigned int gettick(void);
int add_timer(unsigned int,TimerFunc f,int,int); int add_timer(unsigned int,TimerFunc f,int,int);
int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int interval); int add_timer_interval(unsigned int tick, TimerFunc func, int id, int data, int interval);
int delete_timer(int,TimerFunc f); //int delete_timer(int,TimerFunc f);
int delete_timer_sub(int,TimerFunc f, const char* file, int line);
#define delete_timer(id, f) delete_timer_sub(id, f, __FILE__, __LINE__)
int addtick_timer(int tid,unsigned int tick); int addtick_timer(int tid,unsigned int tick);
int settick_timer(int tid,unsigned int tick); int settick_timer(int tid,unsigned int tick);

View File

@ -3217,6 +3217,7 @@ int skill_castend_damage_id (struct block_list* src, struct block_list *bl, int
sd->splash_range, BL_CHAR, sd->splash_range, BL_CHAR,
src, skillid, skilllv, tick, flag | BCT_ENEMY | 1, src, skillid, skilllv, tick, flag | BCT_ENEMY | 1,
skill_castend_damage_id); skill_castend_damage_id);
flag|=1; //Set flag to 1 so ammo is not double-consumed. [Skotlex]
} }
} }
break; break;