-
Notifications
You must be signed in to change notification settings - Fork 0
/
campaign_logs_lotw.php
82 lines (57 loc) · 2.98 KB
/
campaign_logs_lotw.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
// ------------------------ //
// --- Lair of the Wyrm --- //
// ------------------------ //
if(!(in_array($aqs['quest_id'], $questsCompleted))){
if ($currentAct == "Act 1"){
if (count($questsCompleted) == 1){
if($aqs['quest_id'] == "20"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
$AvailableQuests[$aqs['quest_id']]['quest_status']['message'] = "Available after setup.";
} else if ($aqs['quest_id'] == "21"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 2;
$AvailableQuests[$aqs['quest_id']]['quest_status']['message'] = "Available after " . $AvailableQuests[20]['quest_name'] . ".";
} else if ($aqs['quest_id'] == "22"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 2;
$AvailableQuests[$aqs['quest_id']]['quest_status']['message'] = "Available after " . $AvailableQuests[21]['quest_name'] .".";
}
}
if (count($questsCompleted) == 2){
if ($aqs['quest_id'] == "21"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
$AvailableQuests[$aqs['quest_id']]['quest_status']['message'] = "Available after " . $AvailableQuests[20]['quest_name'] . ".";
} else if ($aqs['quest_id'] == "22"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 2;
$AvailableQuests[$aqs['quest_id']]['quest_status']['message'] = "Available after " . $AvailableQuests[21]['quest_name'] .".";
}
}
if (count($questsCompleted) == 3){
if ($aqs['quest_id'] == "22"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
$AvailableQuests[$aqs['quest_id']]['quest_status']['message'] = "Available after " . $AvailableQuests[21]['quest_name'] .".";
}
}
} else if ($currentAct == "Interlude"){
$questCount = $questsWonByHeroesAct1;
if (count($questCount) >= 2){
// Check which quest is linked to the heroes and set that to available
if($aqs['quest_req_type'] == "Heroes"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
setQuestMessage("more-hero-wins-heroes", $aqs['quest_id'], $aqs['quest_req'], $questAct, NULL);
// Set the message of the other quest
} else {
setQuestMessage("more-hero-wins-overlord", $aqs['quest_id'], $aqs['quest_req'], $questAct, NULL);
}
// If there are 2 or more quests won by the Overlord
} else if (count($questCount) < 2){
// Check which quest is linked to the overlord and set that to available
if ($aqs['quest_req_type'] == "Overlord"){
$AvailableQuests[$aqs['quest_id']]['quest_status']['available'] = 1;
setQuestMessage("more-overlord-wins-heroes", $aqs['quest_id'], $aqs['quest_req'], $questAct, NULL);
// Set the message of the other quest
} else {
setQuestMessage("more-overlord-wins-overlord", $aqs['quest_id'], $aqs['quest_req'], $questAct, NULL);
}
}
}
} // in array end