mirror of
https://github.com/ErikasKontenis/SabrehavenServer.git
synced 2025-10-14 06:34:55 +02:00
implement please bring me to [city] functionality
This commit is contained in:
@@ -151,6 +151,9 @@ bool BehaviourDatabase::loadConditions(ScriptReader& script, NpcBehaviour* behav
|
||||
} else if (identifier == "pzblock") {
|
||||
condition->type = BEHAVIOUR_TYPE_PZLOCKED;
|
||||
searchTerm = true;
|
||||
} else if (identifier == "pzfree") {
|
||||
condition->type = BEHAVIOUR_TYPE_PZFREE;
|
||||
searchTerm = true;
|
||||
} else if (identifier == "promoted") {
|
||||
condition->type = BEHAVIOUR_TYPE_PROMOTED;
|
||||
searchTerm = true;
|
||||
@@ -756,6 +759,11 @@ bool BehaviourDatabase::checkCondition(const NpcBehaviourCondition* condition, P
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case BEHAVIOUR_TYPE_PZFREE:
|
||||
if (player->isPzLocked()) {
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case BEHAVIOUR_TYPE_PROMOTED: {
|
||||
int32_t value = 0;
|
||||
player->getStorageValue(30018, value);
|
||||
|
@@ -91,6 +91,7 @@ enum NpcBehaviourType_t
|
||||
BEHAVIOUR_TYPE_DELETEAMOUNT, // deletes an item according specified amount
|
||||
BEHAVIOUR_TYPE_EXPIRINGQUESTVALUE, // get/set expiring quest value
|
||||
BEHAVIOUR_TYPE_SLOTITEM, // get slot item
|
||||
BEHAVIOUR_TYPE_PZFREE, // is player pz not locked
|
||||
};
|
||||
|
||||
enum NpcBehaviourOperator_t
|
||||
|
Reference in New Issue
Block a user