--- deliantra/server/socket/request.C 2006/09/16 22:24:13 1.21 +++ deliantra/server/socket/request.C 2006/09/19 22:05:55 1.24 @@ -1133,6 +1133,7 @@ AddIfShort (pl->last_stats.Con, pl->ob->stats.Con, CS_STAT_CON); AddIfShort (pl->last_stats.Cha, pl->ob->stats.Cha, CS_STAT_CHA); } + if (pl->socket.exp64) { uint8 s; @@ -1152,14 +1153,12 @@ } } } + if (pl->socket.exp64) - { - AddIfInt64 (pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP64); - } + { AddIfInt64 (pl->last_stats.exp, pl->ob->stats.exp, CS_STAT_EXP64) } else - { - AddIfInt (pl->last_stats.exp, (int) pl->ob->stats.exp, CS_STAT_EXP); - } + { AddIfInt (pl->last_stats.exp, (int) pl->ob->stats.exp, CS_STAT_EXP) } + AddIfShort (pl->last_level, (char) pl->ob->level, CS_STAT_LEVEL); AddIfShort (pl->last_stats.wc, pl->ob->stats.wc, CS_STAT_WC); AddIfShort (pl->last_stats.ac, pl->ob->stats.ac, CS_STAT_AC); @@ -1169,16 +1168,17 @@ AddIfFloat (pl->last_weapon_sp, pl->weapon_sp, CS_STAT_WEAP_SP); AddIfInt (pl->last_weight_limit, (sint32) weight_limit[pl->ob->stats.Str], CS_STAT_WEIGHT_LIM); flags = 0; + if (pl->fire_on) flags |= SF_FIREON; + if (pl->run_on) flags |= SF_RUNON; AddIfShort (pl->last_flags, flags, CS_STAT_FLAGS); + if (pl->socket.sc_version < 1025) - { - AddIfShort (pl->last_resist[ATNR_PHYSICAL], pl->ob->resist[ATNR_PHYSICAL], CS_STAT_ARMOUR); - } + { AddIfShort (pl->last_resist[ATNR_PHYSICAL], pl->ob->resist[ATNR_PHYSICAL], CS_STAT_ARMOUR) } else { int i; @@ -1188,15 +1188,18 @@ /* Skip ones we won't send */ if (atnr_cs_stat[i] == -1) continue; + AddIfShort (pl->last_resist[i], pl->ob->resist[i], (char) atnr_cs_stat[i]); } } + if (pl->socket.monitor_spells) { AddIfInt (pl->last_path_attuned, pl->ob->path_attuned, CS_STAT_SPELL_ATTUNE); AddIfInt (pl->last_path_repelled, pl->ob->path_repelled, CS_STAT_SPELL_REPEL); AddIfInt (pl->last_path_denied, pl->ob->path_denied, CS_STAT_SPELL_DENY); } + rangetostring (pl->ob, buf); /* we want use the new fire & run system in new client */ AddIfString (pl->socket.stats.range, buf, CS_STAT_RANGE); set_title (pl->ob, buf); @@ -1210,10 +1213,10 @@ #endif Send_With_Handling (&pl->socket, &sl); } + free (sl.buf); } - /** * Tells the client that here is a player it should start using. */ @@ -1241,7 +1244,6 @@ SET_FLAG (pl->ob, FLAG_CLIENT_SENT); } - /** * Need to send an animation sequence to the client. * We will send appropriate face commands to the client if we haven't @@ -2088,6 +2090,7 @@ { uint8 stat_hp = 0; uint8 stat_width = 0; + uint8 flags = 0; tag_t player = 0; // send hp information, if applicable @@ -2105,6 +2108,9 @@ } } + if (op->msg && op->msg[0] == '@') + flags |= 1; + if (op->type == PLAYER && op != pl) player = op->count; } @@ -2139,6 +2145,17 @@ SockList_AddChar (&sl, 4); SockList_AddInt (&sl, player); } + + if (lastcell.flags != flags) + { + lastcell.flags = flags; + + mask |= 0x8; + *last_ext |= 0x80; + last_ext = sl.buf + sl.len; + SockList_AddChar (&sl, 8); + SockList_AddChar (&sl, flags); + } } /* Floor face */