Core/Conditions

* rewritten and moved to its own class, should be easier to expand in the future
 * add missing sources and types from TrinityCore
 * implement conditions on Areatrigger and Loot containers
 * implement reverse lookups (e.g. a spell is a conditional for something else)
 * general beautification pass .. should be more legible in general

NOTE:
 * texts have been changed, so the existing translation for esES ist gone
 * selecting and describing condition targets is still wonky
This commit is contained in:
Sarjuuk
2024-04-01 21:33:09 +02:00
parent 84555afae3
commit bc7d561da2
26 changed files with 2158 additions and 1272 deletions

View File

@@ -2407,67 +2407,158 @@ var g_world_object_types = {
7: 'Player Corpse'
};
var g_condition_types = {
1: ['Looting', 'If the conditions are met, this item can be dropped by [npc=$1].'], // CND_SRC_CREATURE_LOOT_TEMPLATE
2: ['Disenchanting', 'If the conditions are met, this item can be found when disenchanting [item=$1].'], // CND_SRC_DISENCHANT_LOOT_TEMPLATE
3: ['Fishing', 'If the conditions are met, fishing in [zone=$1] can yield this item.'], // CND_SRC_FISHING_LOOT_TEMPLATE
4: ['Object Opening', 'If the conditions are met, this item can be found in [object=$1].'], // CND_SRC_GAMEOBJECT_LOOT_TEMPLATE
5: ['Item Opening', 'If the conditions are met, this item can be found in [item=$1].'], // CND_SRC_ITEM_LOOT_TEMPLATE
6: ['Mail Attachm.', 'If the conditions are met, this item can be attached to this mail.'], // CND_SRC_MAIL_LOOT_TEMPLATE
7: ['Milling', 'If the conditions are met, this item can be milled from [item=$1].'], // CND_SRC_MILLING_LOOT_TEMPLATE
8: ['Pickpocketing', 'If the conditions are met, this item can be picked from [npc=$1].'], // CND_SRC_PICKPOCKETING_LOOT_TEMPLATE
9: ['Prospecting', 'If the conditions are met, this item can be prospected from [item=$1].'], // CND_SRC_PROSPECTING_LOOT_TEMPLATE
10: ['Ref. Looting', ''], // CND_SRC_REFERENCE_LOOT_TEMPLATE
11: ['Skinning', 'If the conditions are met, this item can be skinned from [npc=$1].'], // CND_SRC_SKINNING_LOOT_TEMPLATE
12: ['Crafting', 'If the conditions are met, casting [spell=$1] may also create this item.'], // CND_SRC_SPELL_LOOT_TEMPLATE
13: ['Auto Target', 'Only targets matching the conditions can be affected by the spell.'], // CND_SRC_SPELL_IMPLICIT_TARGET
14: ['Gossip', 'Display the related Gossip entry on [npc=$2], if the conditions are met.'], // CND_SRC_GOSSIP_MENU
15: ['Gossip Menu', 'Display the related Gossip menu, if the conditions are met.'], // CND_SRC_GOSSIP_MENU_OPTION
16: ['Vehicle', 'This Creature can be used as a vehicle, if the conditions are met.'], // CND_SRC_CREATURE_TEMPLATE_VEHICLE
17: ['Spell', 'This Spell can only be cast, if the conditions are met.'], // CND_SRC_SPELL
18: ['Spell Click', 'If the conditions are met, [npc=$2] casts [spell=$1] if clicked on.'], // CND_SRC_SPELL_CLICK_EVENT
19: ['Quest Accept', 'The Player can accept this quest, if the condition is met.'], // CND_SRC_QUEST_SHOW_MARK
20: ['Quest Sign', 'A [icon name=quest_startend] [/icon] will be shown for this quest, if the condition is met.'], // CND_SRC_QUEST_ACCEPT
21: ['Vehicle Spell', 'If the conditions are met, vehicle [npc=$2] has [spell=$1] available.'], // CND_SRC_VEHICLE_SPELL
22: ['SmartAI', 'If the conditions are met, the creatures AI may perform additional actions.'], // CND_SRC_SMART_EVENT
23: ['Vendor', 'If the conditions are met, the vendor will have this item available.'], // CND_SRC_NPC_VENDOR
24: ['Spell Proc', 'If the conditions are met, the spell is allowed to proc.'] // CND_SRC_SPELL_PROC
var g_instance_info = {
0: 'Data',
1: 'GUID',
2: 'Boss State',
3: 'Data64'
};
var g_unit_states = {
0: 'Died',
1: 'Melee attacking',
2: 'Charmed',
3: 'Stunned',
4: 'Roaming',
5: 'Chase',
6: 'Focusing',
7: 'Fleeing',
8: 'In flight',
9: 'Follow',
10: 'Root',
11: 'Confused',
12: 'Distracted',
13: 'Isolated',
14: 'Attack player',
15: 'Casting',
16: 'Possessed',
17: 'Charging',
18: 'Jumping',
19: 'Follow formation',
20: 'Move',
21: 'Rotating',
22: 'Evade',
23: 'Roaming move',
24: 'Confused move',
25: 'Fleeing move',
26: 'Chase move',
27: 'Follow move',
28: 'Ignore pathfinding',
29: 'Follow formation move'
};
var g_relation_types = {
0: 'is$N: not; itself',
1: 'is$N: not; in a group with $3',
2: 'is$N: not; in a raid or party with $3',
3: 'is$N: not; owned by $3',
4: 'is$N: not; a passenger of $3',
5: 'was$N: not; summoned by $3'
};
var g_stand_states = {
0: 'standing',
1: 'sitting',
2: 'sitting on a chair',
3: 'sleeping',
4: 'sitting on a low chair',
5: 'sitting on a medium chair',
6: 'sitting on a high chair',
7: 'dead',
8: 'kneeling',
9: 'submerged'
};
var g_quest_states = {
0: 'not yet seen',
1: 'completed',
3: 'taken',
5: 'failed',
6: 'been rewarded',
};
var g_condition_sources = {
0: [['player', null], ''],
1: [['player', null], 'If the conditions are met, [item=$2] can be dropped by [npc=$1].'],
2: [['player', null], 'If the conditions are met, [item=$2] can be found when disenchanting [item=$1].'],
3: [['player', null], 'If the conditions are met, fishing in [zone=$1] can yield [item=$2].'],
4: [['player', null], 'If the conditions are met, [item=$2] can be found in [object=$1].'],
5: [['player', null], 'If the conditions are met, [item=$2] can be found in [item=$1].'],
6: [['player', null], 'If the conditions are met, [item=$2] can be attached to the mail from [quest=$1].'],
7: [['player', null], 'If the conditions are met, [item=$2] can be milled from [item=$1].'],
8: [['player', null], 'If the conditions are met, [item=$2] can be picked from [npc=$1].'],
9: [['player', null], 'If the conditions are met, [item=$2] can be prospected from [item=$1].'],
10: [['player', null], 'If the conditions are met, [item=$2] will be referenced in template #$1.'],
11: [['player', null], 'If the conditions are met, [item=$2] can be gathered from [npc=$1].'],
12: [['player', null], 'If the conditions are met, casting [spell=$1] may also create [item=$2].'],
13: [['target', 'caster'], 'Only a $T%:spell%; matching the conditions can be affected by [spell=$2].'],
14: [['player', 'entity'], 'Display Gossip text #$2 from menu #$1, if the conditions on the $T%:%; are met.'],
15: [['player', 'entity'], 'Display Gossip option #$2 from menu #$1, if the conditions on the $T%:%; are met.'],
16: [['player', 'creature'], '[npc=$2] can be used as a vehicle, if $Tthe %s:its; conditions are met.'],
17: [['caster', 'target'], '[spell=$2] can only be cast, if the $Tspell%s:%s; conditions are met.'],
18: [['player', 'creature'], 'If the $T%s:%s; conditions are met, [npc=$1] casts [spell=$2] if clicked on.'],
19: [['player', null], 'The Player can accept [quest=$2], if the condition is met.'],
20: [['player', null], 'A [icon name=quest_startend] [/icon] will be shown for [quest=$2], if the condition is met.'],
21: [['player', 'creature'], 'If the $T%s:%s; conditions are met, vehicle [npc=$1] has [spell=$2] available.'],
22: [['invoker', 'entity'], 'If the conditions for the $T%:%; are met, the AI may perform additional actions.'],
23: [['player', 'creature'], 'If the conditions for the $T%:%; are met, [npc=$1] will have [item=$2] for sale.'],
24: [['caster', 'target'], 'If the conditions for the $Tspell%:%; are met, the [spell=$2] is allowed to proc.'],
30: [['player', null], 'If the conditions are met, [url=?areatrigger=$2]Areatrigger #$2[/url] is allowed to trigger.']
};
var g_conditions = {
1: 'The Player $has:does not have; an aura of $1',
2: 'The Player $owns: does not own; $1',
3: 'The Player $has:does not have; $1 equipped',
4: 'The Player is$: not; in $1', // also used by 22, 23
5: 'The Player\'s standing with $1 is$: not; $2',
6: 'The Player is$: not; $1',
7: 'The Player $knows: does not know; $1',
8: 'The Player has$: not; finished $1',
9: 'The Player has$: not; accepted $1',
10: 'The Player is$: not; $1',
11: 'WorldState #$1 is$: not; $2',
12: '$1 must$: not; be active',
13: 'The instance $has:does not have; a certain state', // nyi
14: 'The Player has $never:; interacted with $1',
15: 'The Player is$: not; a $1', // also used by 16
17: 'The Player has$: not; achieved $1',
18: 'The Player has$: not; obtained $1',
20: 'The Player\'s gender is$: not; [span class=icon-$2]$1[/span]',
21: 'The target $has:does not have; a certain state', // nyi
24: '', // not used
25: 'The Player $knows: does not know; $1',
26: 'The Creature is$: not; in phase $1',
27: 'The target\'s level is$: not; $2 $1',
28: 'The Player has$: not; completed $1',
29: 'The Player is$: not; within $2yd of $1', // also used by 30
31: 'Casters\'s target is$: not; $1', // also used by 32
33: 'The Player $has:does not have; a certain relation to the target', // nyi
34: 'The target $has:does not have; a certain reaction to the Player', // nyi
35: 'The target is$: not; $2 $1yd away',
36: 'The target is$: not; alive',
37: 'The target\'s health is$: not; $2 $1',
37: 'The target\'s health is$: not; $2 $1%'
0: 'Always $Ntrue:false;',
1: 'The target $Nhas:does not have; an aura of [spell=$1]',
2: 'The Player $Nhas:does not have; $2 [item=$1] in their inventory$C$3 or bank:;',
3: 'The Player $Nhas:does not have; [item=$1] equipped',
4: 'The Player is$N: not; in [zone=$1]',
5: 'The Player\'s standing with [faction=$1] is$N: not; $2',
6: 'The Player is$N: not; a member of the $1',
7: 'The Player is$N: not; proficient in [skill=$1]$C$2 (min. $2):;',
8: 'The Player was$N: not; rewarded [quest=$1]',
9: 'The Player has$N: not; accepted [quest=$1]',
10: 'The Player is$N: not; $1',
11: 'WorldState #$1 is$N: not; $2',
12: '[event=$1] must$N: not; be active',
13: 'The instance\'s $3 at index #$1 is$N: not; equal to "$2"',
14: 'The Player has $Nnever:; interacted with [quest=$1]',
15: 'The Player is$N: not; a $1',
16: 'The Player is$N: not; a $1',
17: 'The Player has$N: not; achieved [achievement=$1]',
18: 'The Player has$N: not; obtained [title=$1]',
19: 'The entity\'s SpawnMask is$N: not; equal to "$1"',
20: 'The Player\'s gender is$N: not; $1',
21: 'The unit\'s state is$N: not; $1',
22: 'The target is$N: not; in $1',
23: 'The target is$N: not; in [zone=$1]',
24: 'The creature is$N: not; a $1',
25: 'The Player $Nknows: does not know; [spell=$1]',
26: 'The entity is$N: not; in phase $1',
27: 'The target\'s level is$N: not; $2 $1',
28: 'The Player has$N: not; completed [quest=$1]',
29: 'The target is$N: not; within $2yd of $C$3deceased:alive; [npc=$1]',
30: 'The target is$N: not; within $2yd of [object=$1]',
31: 'The entity is$N: not; $C$2: a; $1$C$3 (GUID $3):;',
32: 'The entity is$N: not; a $1',
33: '$1 $2',
34: 'The unit is$N: not; $2 to $1',
35: 'The distance between unit and $1 is$N: not; $3 $2yd',
36: 'The unit is$N: not; alive',
37: 'The unit\'s health is$N: not; $2 $1 points',
38: 'The unit\'s health is$N: not; $2 $1%',
39: '[achievement=$1] $Nwas:is yet to be; achieved on this realm',
40: 'The unit is$N: not; swimming',
42: 'The creature is$N: not; $1',
43: 'The Player has$N: not yet; done [quest=$1] for the day',
44: 'The unit is$N: not; charmed',
45: 'The Player $Nhas:doesn\'t have; an active $C$1hunter:summoned; pet',
46: 'The Player is$N: not; riding a taxi',
47: 'The Player has$N: not; $2 [quest=$1]',
48: 'The Player has$N: not; collected $3 towards objective #$2 of [quest=$1]',
49: 'The current map difficulty is #$1',
50: 'The Player $C$1$Ncan:can\'t; be:is$N: not;; a Gamemaster'
};
/* end aowow custom */
var LANG = {
@@ -4844,6 +4935,11 @@ var LANG = {
/* AoWoW: start custom */
tab_conditions: '[Conditions]',
tab_condition_for: '[Condition for]',
cnd_either: '[Either]',
cnd_or: '[Or]',
// Guide
myguides: 'Mes guides',
listguides: '[List of guides]',