mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Moved buff definitions into 'spells' lookup
This commit is contained in:
+10
-10
@@ -4460,12 +4460,12 @@ namespace UF
|
||||
static inline int ServerToUFBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= EQEmu::constants::LongBuffs + EQEmu::constants::ShortBuffs)
|
||||
return index - EQEmu::constants::LongBuffs - EQEmu::constants::ShortBuffs +
|
||||
constants::LongBuffs + constants::ShortBuffs;
|
||||
if (index >= EQEmu::spells::LONG_BUFFS + EQEmu::spells::SHORT_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS - EQEmu::spells::SHORT_BUFFS +
|
||||
spells::LONG_BUFFS + spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= EQEmu::constants::LongBuffs)
|
||||
return index - EQEmu::constants::LongBuffs + constants::LongBuffs;
|
||||
if (index >= EQEmu::spells::LONG_BUFFS)
|
||||
return index - EQEmu::spells::LONG_BUFFS + spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
@@ -4473,12 +4473,12 @@ namespace UF
|
||||
static inline int UFToServerBuffSlot(int index)
|
||||
{
|
||||
// we're a disc
|
||||
if (index >= constants::LongBuffs + constants::ShortBuffs)
|
||||
return index - constants::LongBuffs - constants::ShortBuffs + EQEmu::constants::LongBuffs +
|
||||
EQEmu::constants::ShortBuffs;
|
||||
if (index >= spells::LONG_BUFFS + spells::SHORT_BUFFS)
|
||||
return index - spells::LONG_BUFFS - spells::SHORT_BUFFS + EQEmu::spells::LONG_BUFFS +
|
||||
EQEmu::spells::SHORT_BUFFS;
|
||||
// we're a song
|
||||
if (index >= constants::LongBuffs)
|
||||
return index - constants::LongBuffs + EQEmu::constants::LongBuffs;
|
||||
if (index >= spells::LONG_BUFFS)
|
||||
return index - spells::LONG_BUFFS + EQEmu::spells::LONG_BUFFS;
|
||||
// we're a normal buff
|
||||
return index; // as long as we guard against bad slots server side, we should be fine
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user