From f0d0c837108e6925103b268e33d4792ecdc9fe23 Mon Sep 17 00:00:00 2001 From: "Michael Cook (mackal)" Date: Thu, 3 Jun 2021 11:17:56 -0400 Subject: [PATCH] Magic numbers bad (#1373) --- common/spdat.h | 1 + zone/bonuses.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/common/spdat.h b/common/spdat.h index d6d6ef144..8f78cc992 100644 --- a/common/spdat.h +++ b/common/spdat.h @@ -32,6 +32,7 @@ #define SPELL_HARM_TOUCH2 2821 #define SPELL_IMP_HARM_TOUCH 2774 #define SPELL_NPC_HARM_TOUCH 929 +#define SPELL_AVATAR_ST_PROC 2434 #define EFFECT_COUNT 12 diff --git a/zone/bonuses.cpp b/zone/bonuses.cpp index fc513577d..19ad4a45e 100644 --- a/zone/bonuses.cpp +++ b/zone/bonuses.cpp @@ -204,7 +204,7 @@ void Client::ProcessItemCaps() // The Sleeper Tomb Avatar proc counts towards item ATK // The client uses a 100 here, so using a 100 here the client and server will agree // For example, if you set the effect to be 200 it will get 100 item ATK and 100 spell ATK - if (IsValidSpell(2434) && FindBuff(2434)) { + if (IsValidSpell(SPELL_AVATAR_ST_PROC) && FindBuff(SPELL_AVATAR_ST_PROC)) { itembonuses.ATK += 100; spellbonuses.ATK -= 100; }