summaryrefslogtreecommitdiff
path: root/src/map/unit.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-30 09:21:28 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-06-30 09:21:28 +0000
commit62ba3401df75d514b91aa7e1b2f818609950f735 (patch)
tree3d4c22de62871e8dc6c199a9d08360f39bdf4cff /src/map/unit.c
parent7ceb4db245c386772e57b1f7be8793f75f18a0c0 (diff)
downloadhercules-62ba3401df75d514b91aa7e1b2f818609950f735.tar.gz
hercules-62ba3401df75d514b91aa7e1b2f818609950f735.tar.bz2
hercules-62ba3401df75d514b91aa7e1b2f818609950f735.tar.xz
hercules-62ba3401df75d514b91aa7e1b2f818609950f735.zip
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
Diffstat (limited to 'src/map/unit.c')
-rw-r--r--src/map/unit.c8
1 files changed, 4 insertions, 4 deletions
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);
}