--- deliantra/server/socket/item.C 2006/09/20 21:53:50 1.9 +++ deliantra/server/socket/item.C 2006/09/27 00:36:09 1.10 @@ -607,7 +607,12 @@ void ExamineCmd (char *buf, int len, player *pl) { - long tag = atoi (buf); + tag_t tag = atoi (buf); + + /* If the high bit is set, player examined a pseudo object. */ + if (tag & 0x80000000) + return; + object *op = esrv_get_ob_from_count (pl->ob, tag); if (!op) @@ -615,6 +620,7 @@ LOG (llevDebug, "Player '%s' tried to examine the unknown object (%ld)\n", &pl->ob->name, tag); return; } + examine (pl->ob, op); } @@ -622,8 +628,7 @@ void ApplyCmd (char *buf, int len, player *pl) { - uint32 tag = atoi (buf); - object *op = esrv_get_ob_from_count (pl->ob, tag); + tag_t tag = atoi (buf); /* sort of a hack, but if the player saves and the player then manually * applies a savebed (or otherwise tries to do stuff), we run into trouble. @@ -639,11 +644,14 @@ return; } + object *op = esrv_get_ob_from_count (pl->ob, tag); + if (!op) { LOG (llevDebug, "Player '%s' tried to apply the unknown object (%d)\n", &pl->ob->name, tag); return; } + player_apply (pl->ob, op, 0, 0); }