From 62ba3401df75d514b91aa7e1b2f818609950f735 Mon Sep 17 00:00:00 2001 From: ultramage Date: Tue, 30 Jun 2009 09:21:28 +0000 Subject: Fixed sql char deletion code using a broken pet deletion query (ran very slow, and had a typo in a binary shift operation) (bugreport:3304). Fixed change r13774 to the code responsible for deciding whether to move 1 extra cell when stopping walking; it had its logic inverted by mistake (bugreport:3312). Cleaned up the itemlist, cartlist and storagelist gm command code: - fixed buffer overflows in all three functions (bugreport:456). - merged all three atcommand functions into a single one; the appropriate behavior is detected from the command's name. - using the StringBuf class instead of static-size buffers and string operations for more efficient and safe processing. - using 'jname' (the one without underscores) as the primary item name in the list, and not using the aegis name for cards at all (since it's almost identical). - fixed forged item details never being displayed due to a missing strcat(). - extended item info (crafted/named items, pet eggs) will now be displayed for storage and cart list as well. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13920 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/unit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/unit.c') diff --git a/src/map/unit.c b/src/map/unit.c index 89e1b3788..1adfe16c6 100644 --- a/src/map/unit.c +++ b/src/map/unit.c @@ -636,7 +636,7 @@ int unit_warp(struct block_list *bl,short m,short x,short y,int type) * &0x1: Issue a fixpos packet afterwards * &0x2: Force the unit to move one cell if it hasn't yet * &0x4: Enable moving to the next cell when unit was already half-way there - * (could trigger additional on-touch/place code) + * (may cause on-touch/place side-effects, such as a scripted map change) *------------------------------------------*/ int unit_stop_walking(struct block_list *bl,int type) { @@ -656,9 +656,9 @@ int unit_stop_walking(struct block_list *bl,int type) ud->walktimer = INVALID_TIMER; ud->state.change_walk_target = 0; tick = gettick(); - if ((type&0x02 && !ud->walkpath.path_pos) //Force moving at least one cell. - || (!(type&0x04) && td && DIFF_TICK(td->tick, tick) <= td->data/2)) //Enough time has passed to cover half-cell - { + if( (type&0x02 && !ud->walkpath.path_pos) //Force moving at least one cell. + || (type&0x04 && td && DIFF_TICK(td->tick, tick) <= td->data/2) //Enough time has passed to cover half-cell + ) { ud->walkpath.path_len = ud->walkpath.path_pos+1; unit_walktoxy_timer(-1, tick, bl->id, ud->walkpath.path_pos); } -- cgit v1.2.3-60-g2f50