summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFate <fate-tmw@googlemail.com>2009-01-31 11:44:01 -0700
committerFate <fate-tmw@googlemail.com>2009-01-31 11:44:01 -0700
commitd62b01b62ac59e84c13782af2067f5669a97221e (patch)
tree7ea28fac3d50e7dbad68066cd6bdcb38bd6cb4b1
parentd54cf73f7ca82bdfd4949d7987e90fa14c23833b (diff)
downloadtmwa-d62b01b62ac59e84c13782af2067f5669a97221e.tar.gz
tmwa-d62b01b62ac59e84c13782af2067f5669a97221e.tar.bz2
tmwa-d62b01b62ac59e84c13782af2067f5669a97221e.tar.xz
tmwa-d62b01b62ac59e84c13782af2067f5669a97221e.zip
Change the icon parameter for installing attack spells to report status updates
-rw-r--r--doc/spell-language3
-rw-r--r--src/map/magic-stmt.c18
2 files changed, 8 insertions, 13 deletions
diff --git a/doc/spell-language b/doc/spell-language
index ff13c1d..b4ef833 100644
--- a/doc/spell-language
+++ b/doc/spell-language
@@ -640,7 +640,8 @@ This section documents the operations API.
which time the previous behaviour is restored.)
`delay' specifies the attack delay.
`range' specifies the attack range as shown in the client GUI.
- `icon' is presently unused.
+ `icon' is the ID of a status-effect ID that will be displayed
+ while the spell is in effect.
`animation' is the attack animation ID that should be used.
Note that if the ATTRIGGER effect ABORTs, no charge will be
diff --git a/src/map/magic-stmt.c b/src/map/magic-stmt.c
index 24b4c0f..b5128e3 100644
--- a/src/map/magic-stmt.c
+++ b/src/map/magic-stmt.c
@@ -103,28 +103,22 @@ free_invocation(invocation_t *invocation)
static void
char_set_weapon_icon(character_t *subject, int count, int icon, int look)
{
-// const int magic_item_inventory_index = -1;
-// const int weapon_position = 4;
-
- // The icon isn't working at the moment.
+ const int old_icon = subject->attack_spell_icon_override;
subject->attack_spell_icon_override = icon;
subject->attack_spell_look_override = look;
+ if (old_icon && old_icon != icon)
+ clif_status_change(&subject->bl, old_icon, 0);
+
clif_fixpcpos(subject);
if (count) {
-// /* Set it to `override' */
-// clif_additem(subject, magic_item_inventory_index, count, 0, icon);
clif_changelook(&subject->bl, LOOK_WEAPON, look);
-// clif_equipitemack(subject, magic_item_inventory_index, weapon_position, 1);
+ if (icon)
+ clif_status_change(&subject->bl, icon, 1);
} else {
/* Set it to `normal' */
clif_changelook(&subject->bl, LOOK_WEAPON, subject->status.weapon);
-
-// if (subject->equip_index[weapon_position] == -1)
-// clif_equipitemack(subject, 0, weapon_position, 1);
-// else
-// clif_equipitemack(subject, subject->equip_index[weapon_position], weapon_position, 1);
}
}