mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +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;
|
return false;
|
||||||
}
|
}
|
||||||
|
case CONDITION_GENDER:
|
||||||
|
return player->getGender() == m_value1;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
@ -8508,6 +8510,15 @@ bool PlayerCondition::IsValid(uint16 entry, ConditionType condition, uint32 valu
|
||||||
|
|
||||||
break;
|
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:
|
case CONDITION_NONE:
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,7 @@ enum ConditionType
|
||||||
CONDITION_SOURCE_AURA = 32, // spell_id effindex (returns true if the source of the condition check has aura of spell_id, effIndex)
|
CONDITION_SOURCE_AURA = 32, // spell_id effindex (returns true if the source of the condition check has aura of spell_id, effIndex)
|
||||||
CONDITION_LAST_WAYPOINT = 33, // waypointId 0 = exact, 1: wp <= waypointId, 2: wp > waypointId Use to check what waypoint was last reached
|
CONDITION_LAST_WAYPOINT = 33, // waypointId 0 = exact, 1: wp <= waypointId, 2: wp > waypointId Use to check what waypoint was last reached
|
||||||
CONDITION_XP_USER = 34, // 0, 1 (0: XP off, 1: XP on) for player 0
|
CONDITION_XP_USER = 34, // 0, 1 (0: XP off, 1: XP on) for player 0
|
||||||
|
CONDITION_GENDER = 35, // 0=male, 1=female, 2=none (see enum Gender)
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ConditionSource // From where was the condition called?
|
enum ConditionSource // From where was the condition called?
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "12582"
|
#define REVISION_NR "12583"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue