… | |
… | |
730 | |
730 | |
731 | /** |
731 | /** |
732 | * Get player's current range attack in obuf. |
732 | * Get player's current range attack in obuf. |
733 | */ |
733 | */ |
734 | static void |
734 | static void |
735 | rangetostring (object *ob, char *obuf) |
735 | rangetostring (player *pl, char *obuf) |
736 | { |
736 | { |
737 | dynbuf_text buf; |
737 | dynbuf_text buf; |
738 | |
738 | |
739 | player *pl = ob->contr; |
|
|
740 | |
|
|
741 | if (pl->ranged_ob) |
739 | if (pl->ranged_ob) |
742 | buf << " Range: " << pl->ranged_ob->name; |
740 | buf << " Range" << (pl->ob->current_weapon == pl->ranged_ob ? "*" : "") << ": " << pl->ranged_ob->name; |
743 | |
741 | |
744 | if (pl->combat_ob) |
742 | if (pl->combat_ob) |
745 | buf << " Combat: " << pl->combat_ob->name; |
743 | buf << " Combat" << (pl->ob->current_weapon == pl->combat_ob ? "*" : "") << ": " << pl->combat_ob->name; |
746 | |
744 | |
|
|
745 | //TODO: maybe golem should become the current_weapon, quite simply? |
747 | if (pl->golem) |
746 | if (pl->golem) |
748 | buf << " Golem: " << pl->golem->name; |
747 | buf << " Golem*: " << pl->golem->name; |
749 | |
748 | |
750 | buf.linearise (obuf); |
749 | buf.linearise (obuf); |
751 | obuf [buf.size ()] = 0; |
750 | obuf [buf.size ()] = 0; |
752 | } |
751 | } |
753 | |
752 | |
… | |
… | |
863 | AddIfInt (ns->last_path_attuned, ob->path_attuned, CS_STAT_SPELL_ATTUNE); |
862 | AddIfInt (ns->last_path_attuned, ob->path_attuned, CS_STAT_SPELL_ATTUNE); |
864 | AddIfInt (ns->last_path_repelled, ob->path_repelled, CS_STAT_SPELL_REPEL); |
863 | AddIfInt (ns->last_path_repelled, ob->path_repelled, CS_STAT_SPELL_REPEL); |
865 | AddIfInt (ns->last_path_denied, ob->path_denied, CS_STAT_SPELL_DENY); |
864 | AddIfInt (ns->last_path_denied, ob->path_denied, CS_STAT_SPELL_DENY); |
866 | } |
865 | } |
867 | |
866 | |
868 | rangetostring (ob, buf); /* we want use the new fire & run system in new client */ |
867 | rangetostring (pl, buf); /* we want use the new fire & run system in new client */ |
869 | AddIfString (ns->stats.range, buf, CS_STAT_RANGE); |
868 | AddIfString (ns->stats.range, buf, CS_STAT_RANGE); |
870 | set_title (ob, buf); |
869 | set_title (ob, buf); |
871 | AddIfString (ns->stats.title, buf, CS_STAT_TITLE); |
870 | AddIfString (ns->stats.title, buf, CS_STAT_TITLE); |
872 | |
871 | |
873 | /* Only send it away if we have some actual data */ |
872 | /* Only send it away if we have some actual data */ |