Implemented 'enum class ClientVersion' -- added 'RoF2' to lua client version enumeration

This commit is contained in:
Uleat
2015-01-19 23:32:57 -05:00
parent 52eb287082
commit e70e443950
51 changed files with 311 additions and 520 deletions
+5 -5
View File
@@ -255,7 +255,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
bitmask = bitmask << (CastToClient()->GetClass() - 1);
if( itm && itm->GetItem()->Classes != 65535 ) {
if ((itm->GetItem()->Click.Type == ET_EquipClick) && !(itm->GetItem()->Classes & bitmask)) {
if (CastToClient()->GetClientVersion() < EQClientSoF) {
if (CastToClient()->GetClientVersion() < ClientVersion::SoF) {
// They are casting a spell from an item that requires equipping but shouldn't let them equip it
LogFile->write(EQEmuLog::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) which they shouldn't be able to equip!",
CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID);
@@ -267,14 +267,14 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
return(false);
}
if ((itm->GetItem()->Click.Type == ET_ClickEffect2) && !(itm->GetItem()->Classes & bitmask)) {
if (CastToClient()->GetClientVersion() < EQClientSoF) {
if (CastToClient()->GetClientVersion() < ClientVersion::SoF) {
// They are casting a spell from an item that they don't meet the race/class requirements to cast
LogFile->write(EQEmuLog::Error, "HACKER: %s (account: %s) attempted to click a race/class restricted effect on item %s (id: %d) which they shouldn't be able to click!",
CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID);
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking race/class restricted item with an invalid class");
}
else {
if (CastToClient()->GetClientVersion() >= EQClientRoF)
if (CastToClient()->GetClientVersion() >= ClientVersion::RoF)
{
// Line 181 in eqstr_us.txt was changed in RoF+
Message(15, "Your race, class, or deity cannot use this item.");
@@ -288,7 +288,7 @@ bool Mob::CastSpell(uint16 spell_id, uint16 target_id, uint16 slot,
}
}
if( itm && (itm->GetItem()->Click.Type == ET_EquipClick) && !(item_slot <= MainAmmo || item_slot == MainPowerSource) ){
if (CastToClient()->GetClientVersion() < EQClientSoF) {
if (CastToClient()->GetClientVersion() < ClientVersion::SoF) {
// They are attempting to cast a must equip clicky without having it equipped
LogFile->write(EQEmuLog::Error, "HACKER: %s (account: %s) attempted to click an equip-only effect on item %s (id: %d) without equiping it!", CastToClient()->GetCleanName(), CastToClient()->AccountName(), itm->GetItem()->Name, itm->GetItem()->ID);
database.SetHackerFlag(CastToClient()->AccountName(), CastToClient()->GetCleanName(), "Clicking equip-only item without equiping it");
@@ -5251,7 +5251,7 @@ void Client::SendBuffDurationPacket(Buffs_Struct &buff)
void Client::SendBuffNumHitPacket(Buffs_Struct &buff, int slot)
{
// UF+ use this packet
if (GetClientVersion() < EQClientUnderfoot)
if (GetClientVersion() < ClientVersion::Und)
return;
EQApplicationPacket *outapp;
outapp = new EQApplicationPacket(OP_BuffCreate, sizeof(BuffIcon_Struct) + sizeof(BuffIconEntry_Struct));