diff options
author | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-21 16:18:19 +0000 |
---|---|---|
committer | haranp <haranp@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-04-21 16:18:19 +0000 |
commit | fac344b62ebbf48e7b1d2a7b5f0bcdd3608bd4a7 (patch) | |
tree | 8cc8a0b1312414c79f2c2d6e3d1e455754be41ea /crawl-ref/source/spl-cast.cc | |
parent | b2ea8143ccf52a2cacfa48d19ce2ea603ddaab5e (diff) | |
download | crawl-ref-fac344b62ebbf48e7b1d2a7b5f0bcdd3608bd4a7.tar.gz crawl-ref-fac344b62ebbf48e7b1d2a7b5f0bcdd3608bd4a7.zip |
Eliminated it_name(), in_name(), item_name(). The function to use is
now item_def::name().
Cleaned up a lot of code in the process.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1341 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 125443d3fe..7a3f84d2dd 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -95,7 +95,7 @@ static bool surge_identify_boosters(int spell) ID_KNOWN_TYPE ); set_ident_flags(ring, ISFLAG_KNOW_PROPERTIES); mprf("You are wearing: %s", - item_name(ring, DESC_INVENTORY_EQUIP)); + ring.name(DESC_INVENTORY_EQUIP).c_str()); } } } @@ -776,17 +776,10 @@ void spellcasting_side_effects(spell_type spc2, bool idonly = false) if (random2(100) < total_skill) { - char str_pass[ ITEMNAME_SIZE ]; - + item_def& wpn = you.inv[you.equip[EQ_WEAPON]]; // changed from ISFLAG_KNOW_TYPE - set_ident_flags( you.inv[you.equip[EQ_WEAPON]], ISFLAG_IDENT_MASK); - - strcpy(info, "You are wielding "); - in_name(you.equip[EQ_WEAPON], DESC_NOCAP_A, str_pass); - strcat(info, str_pass); - strcat(info, "."); - mpr(info); - + set_ident_flags( wpn, ISFLAG_IDENT_MASK); + mprf("You are wielding %s.", wpn.name(DESC_NOCAP_A).c_str()); more(); you.wield_change = true; |