mirror of
https://github.com/mangosfour/server.git
synced 2025-12-15 19:37:02 +00:00
[c12583] Implement CONDITION_GENDER
This commit is contained in:
parent
e0192deaf6
commit
cda8f44cad
3 changed files with 13 additions and 2 deletions
|
|
@ -8096,6 +8096,8 @@ bool PlayerCondition::Meets(Player const* player, Map const* map, WorldObject co
|
|||
}
|
||||
return false;
|
||||
}
|
||||
case CONDITION_GENDER:
|
||||
return player->getGender() == m_value1;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -8508,6 +8510,15 @@ bool PlayerCondition::IsValid(uint16 entry, ConditionType condition, uint32 valu
|
|||
|
||||
break;
|
||||
}
|
||||
case CONDITION_GENDER:
|
||||
{
|
||||
if (value1 >= MAX_GENDER)
|
||||
{
|
||||
sLog.outErrorDb("Gender condition (entry %u, type %u) has an invalid value in value1. (Has %u, must be smaller than %u), skipping.", entry, condition, value1, MAX_GENDER);
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CONDITION_NONE:
|
||||
break;
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue