Removed obsolete quest global data.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for global quest data (i.e. quest data not particular to a player)
|
||||
-- Note: We had considered using character_quests with char_id = 0 for this, but decided
|
||||
-- against it, primarily for aesthetic purposes, cleaningness of code, expectability, and
|
||||
-- to keep char-related data purely as char-related data, global purely as global.
|
||||
-- ----------------------------
|
||||
CREATE TABLE IF NOT EXISTS `quest_global_data` (
|
||||
`quest_name` VARCHAR(40) NOT NULL DEFAULT '',
|
||||
`var` VARCHAR(20) NOT NULL DEFAULT '',
|
||||
`value` VARCHAR(255) ,
|
||||
PRIMARY KEY (`quest_name`,`var`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
@@ -24,6 +24,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
import org.l2jmobius.Config;
|
||||
import org.l2jmobius.commons.util.Rnd;
|
||||
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Location;
|
||||
import org.l2jmobius.gameserver.model.StatSet;
|
||||
@@ -123,8 +124,7 @@ public class Core extends Quest
|
||||
}
|
||||
else
|
||||
{
|
||||
final String test = loadGlobalQuestVar("Core_Attacked");
|
||||
if (test.equalsIgnoreCase("true"))
|
||||
if (GlobalVariablesManager.getInstance().getBoolean("CoreAttacked", false))
|
||||
{
|
||||
_firstAttacked = true;
|
||||
}
|
||||
@@ -140,8 +140,7 @@ public class Core extends Quest
|
||||
@Override
|
||||
public void saveGlobalData()
|
||||
{
|
||||
final String val = "" + _firstAttacked;
|
||||
saveGlobalQuestVar("Core_Attacked", val);
|
||||
GlobalVariablesManager.getInstance().set("CoreAttacked", _firstAttacked);
|
||||
}
|
||||
|
||||
public void spawnBoss(GrandBossInstance npc)
|
||||
|
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
package ai.bosses;
|
||||
|
||||
import org.l2jmobius.gameserver.instancemanager.GlobalVariablesManager;
|
||||
import org.l2jmobius.gameserver.instancemanager.GrandBossManager;
|
||||
import org.l2jmobius.gameserver.model.Party;
|
||||
import org.l2jmobius.gameserver.model.actor.instance.NpcInstance;
|
||||
@@ -95,14 +96,14 @@ public class Sailren extends Quest
|
||||
}
|
||||
case "open":
|
||||
{
|
||||
deleteGlobalQuestVar("close");
|
||||
GlobalVariablesManager.getInstance().remove("SailrenClose");
|
||||
cancelQuestTimer("open", npc, null);
|
||||
break;
|
||||
}
|
||||
case "vkrovatku":
|
||||
{
|
||||
npc.deleteMe();
|
||||
deleteGlobalQuestVar("close");
|
||||
GlobalVariablesManager.getInstance().remove("SailrenClose");
|
||||
cancelQuestTimer("open", npc, null);
|
||||
cancelQuestTimer("vkrovatku", npc, null);
|
||||
break;
|
||||
@@ -116,14 +117,13 @@ public class Sailren extends Quest
|
||||
{
|
||||
if (player.getInventory().getItemByItemId(STONE) != null)
|
||||
{
|
||||
final String close = loadGlobalQuestVar("close");
|
||||
if (close.equals(""))
|
||||
if (!GlobalVariablesManager.getInstance().hasVariable("SailrenClose"))
|
||||
{
|
||||
final Party party = player.getParty();
|
||||
if (party != null)
|
||||
{
|
||||
player.destroyItemByItemId("Sailren", STONE, 1, player, true);
|
||||
saveGlobalQuestVar("close", "1");
|
||||
GlobalVariablesManager.getInstance().set("SailrenClose", true);
|
||||
final BossZone zone = GrandBossManager.getInstance().getZone(27244, -7026, -1974);
|
||||
for (PlayerInstance member : party.getPartyMembers())
|
||||
{
|
||||
@@ -170,7 +170,7 @@ public class Sailren extends Quest
|
||||
}
|
||||
else if (npc == _slrnInstance)
|
||||
{
|
||||
deleteGlobalQuestVar("close");
|
||||
GlobalVariablesManager.getInstance().remove("SailrenClose");
|
||||
cancelQuestTimer("open", npc, null);
|
||||
}
|
||||
return super.onKill(npc, killer, isPet);
|
||||
|
Reference in New Issue
Block a user