aboutsummaryrefslogtreecommitdiff
path: root/internal/game/cmd_attack.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/game/cmd_attack.go')
-rw-r--r--internal/game/cmd_attack.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/game/cmd_attack.go b/internal/game/cmd_attack.go
index 4e2d2c0..f6ccf0c 100644
--- a/internal/game/cmd_attack.go
+++ b/internal/game/cmd_attack.go
@@ -210,7 +210,7 @@ func (g *Game) playerAttack(sess *net.Session, p *player.Player, mob *world.MobI
prefix := fmt.Sprintf(" You hit %s for %d damage.", mobName, dmg)
hpPart := fmt.Sprintf("[%d/%dhp]", mob.HP, mob.MaxHP)
line := fmt.Sprintf("%-*s %s", g.combatPadWidth, prefix, hpPart)
- if p.Toggles["xpdrops"] && len(gains) > 0 {
+ if p.OptionBool("xpdrops") && len(gains) > 0 {
var parts []string
for _, gain := range gains {
parts = append(parts, fmt.Sprintf("+%dxp %s", gain.XP, player.SkillAbbr[player.SkillName(gain.Skill)]))
@@ -453,7 +453,7 @@ func (g *Game) respawnMob(instanceID string) {
if g.Hub != nil {
for _, sess := range g.Hub.PlayersInRoom(homeRoom) {
- if p, ok := sess.Player.(*player.Player); ok && p.Toggles["mobspawn"] {
+ if p, ok := sess.Player.(*player.Player); ok && p.OptionBool("mobspawn") {
sess.WriteLine(fmt.Sprintf("\n%s (level %d) spawns in the area.", mobDisplayName(inst, false), mobCombatLevel(inst)))
}
}