Few more portability fixes

This commit is contained in:
Uleat 2016-03-24 19:35:23 -04:00
parent 90c87a05e6
commit 698ef56df9
2 changed files with 8 additions and 8 deletions

View File

@ -1518,11 +1518,11 @@ bool Bot::IsValidName(std::string& name)
{ {
if (name.length() < 4) if (name.length() < 4)
return false; return false;
if (!IsCharUpper(name[0])) if (!isupper(name[0]))
return false; return false;
for (int i = 1; i < name.length(); ++i) { for (int i = 1; i < name.length(); ++i) {
if (!IsCharLower(name[i]) && name[i] != '_') { if (!islower(name[i]) && name[i] != '_') {
return false; return false;
} }
} }

View File

@ -990,19 +990,19 @@ private:
if (l_size_type < r_size_type) if (l_size_type < r_size_type)
return true; return true;
if (l_size_type == BCEnum::SzT_Enlarge && r_size_type == BCEnum::SzT_Enlarge) { if (l_size_type == BCEnum::SzT_Enlarge && r_size_type == BCEnum::SzT_Enlarge) {
if (EQ_STBASE(l, r, target_type) && GT_SPELLS(l, r, base, 1)) if (EQ_STBASE(l, r, target_type) && GT_SPELLS_EFFECT_ID(l, r, base, 1))
return true; return true;
if (EQ_STBASE(l, r, target_type) && EQ_SPELLS(l, r, base, 1) && GT_STBASE(l, r, spell_level)) if (EQ_STBASE(l, r, target_type) && EQ_SPELLS_EFFECT_ID(l, r, base, 1) && GT_STBASE(l, r, spell_level))
return true; return true;
if (EQ_STBASE(l, r, target_type) && EQ_SPELLS(l, r, base, 1) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class)) if (EQ_STBASE(l, r, target_type) && EQ_SPELLS_EFFECT_ID(l, r, base, 1) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class))
return true; return true;
} }
if (l_size_type == BCEnum::SzT_Reduce && r_size_type == BCEnum::SzT_Reduce) { if (l_size_type == BCEnum::SzT_Reduce && r_size_type == BCEnum::SzT_Reduce) {
if (EQ_STBASE(l, r, target_type) && LT_SPELLS(l, r, base, 1)) if (EQ_STBASE(l, r, target_type) && LT_SPELLS_EFFECT_ID(l, r, base, 1))
return true; return true;
if (EQ_STBASE(l, r, target_type) && EQ_SPELLS(l, r, base, 1) && GT_STBASE(l, r, spell_level)) if (EQ_STBASE(l, r, target_type) && EQ_SPELLS_EFFECT_ID(l, r, base, 1) && GT_STBASE(l, r, spell_level))
return true; return true;
if (EQ_STBASE(l, r, target_type) && EQ_SPELLS(l, r, base, 1) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class)) if (EQ_STBASE(l, r, target_type) && EQ_SPELLS_EFFECT_ID(l, r, base, 1) && EQ_STBASE(l, r, spell_level) && LT_STBASE(l, r, caster_class))
return true; return true;
} }