summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-07 11:31:12 +0300
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-07 18:42:53 +1000
commit2f21ea04c4aa2a807ea9f446b808f1826d6a66cf (patch)
treed53b03eb729afc56cf9e0c75f74bd570c144291c /crawl-ref/source
parentf2a54d7ab10bd5bef162023c0659d6922b5bfa04 (diff)
downloadcrawl-ref-2f21ea04c4aa2a807ea9f446b808f1826d6a66cf.tar.gz
crawl-ref-2f21ea04c4aa2a807ea9f446b808f1826d6a66cf.zip
Replace player_weapon with player::weapon.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source')
-rw-r--r--crawl-ref/source/item_use.cc2
-rw-r--r--crawl-ref/source/player.cc6
-rw-r--r--crawl-ref/source/player.h1
-rw-r--r--crawl-ref/source/spl-cast.cc2
4 files changed, 2 insertions, 9 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 8b9b0ec052..7868fc939f 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -429,7 +429,7 @@ void warn_shield_penalties()
return;
// Warnings are limited to rods, bows, and quarterstaves at the moment.
- const item_def *weapon = player_weapon();
+ const item_def *weapon = you.weapon();
if (!weapon)
return;
diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc
index cf5193c2b0..53fb6991db 100644
--- a/crawl-ref/source/player.cc
+++ b/crawl-ref/source/player.cc
@@ -732,12 +732,6 @@ bool you_tran_can_wear(int eq, bool check_mutation)
return (true);
}
-// Returns the item in the player's weapon slot.
-item_def *player_weapon()
-{
- return (you.weapon());
-}
-
bool player_weapon_wielded()
{
const int wpn = you.equip[EQ_WEAPON];
diff --git a/crawl-ref/source/player.h b/crawl-ref/source/player.h
index 6b8068fb0e..5b9a321a4a 100644
--- a/crawl-ref/source/player.h
+++ b/crawl-ref/source/player.h
@@ -742,7 +742,6 @@ bool disease_player(int amount);
void dec_disease_player();
bool player_weapon_wielded();
-item_def *player_weapon();
// Determines if the given grid is dangerous for the player to enter.
bool is_feat_dangerous(dungeon_feature_type feat);
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 262026415e..b67846757c 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -70,7 +70,7 @@ static bool _surge_identify_boosters(spell_type spell)
// Must not be wielding an unIDed staff.
// Note that robes of the Archmagi identify on wearing,
// so that's less of an issue.
- const item_def* wpn = player_weapon();
+ const item_def* wpn = you.weapon();
if (wpn == NULL
|| wpn->base_type != OBJ_STAVES
|| item_ident(*wpn, ISFLAG_KNOW_PROPERTIES))