From b1a46d0f0da4fd3adc9b4b5393b5ed1fa77fd55e Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Mon, 11 May 2015 01:21:27 -0700 Subject: [PATCH 1/6] Converted TaskManager --- .../src/mineplex/core/task/Task.java | 13 ++ .../src/mineplex/core/task/TaskClient.java | 9 +- .../src/mineplex/core/task/TaskManager.java | 122 ++++++++++++++---- .../core/task/repository/TaskRepository.java | 77 +++++++++-- .../Mineplex.Hub/src/mineplex/hub/Hub.java | 2 +- .../mineplex/hub/modules/ParkourManager.java | 15 ++- .../hub/tutorial/TutorialManager.java | 18 ++- .../src/mineplex/serverdata/Utility.java | 4 +- .../nautilus/game/arcade/ArcadeManager.java | 2 +- .../managers/GameAchievementManager.java | 14 +- Website/LOCWebsite.suo | Bin 474624 -> 474624 bytes 11 files changed, 218 insertions(+), 58 deletions(-) create mode 100644 Plugins/Mineplex.Core/src/mineplex/core/task/Task.java diff --git a/Plugins/Mineplex.Core/src/mineplex/core/task/Task.java b/Plugins/Mineplex.Core/src/mineplex/core/task/Task.java new file mode 100644 index 000000000..de88ecb84 --- /dev/null +++ b/Plugins/Mineplex.Core/src/mineplex/core/task/Task.java @@ -0,0 +1,13 @@ +package mineplex.core.task; + +public class Task +{ + public int Id; + public String Name; + + public Task(int id, String name) + { + Id = id; + Name = name; + } +} diff --git a/Plugins/Mineplex.Core/src/mineplex/core/task/TaskClient.java b/Plugins/Mineplex.Core/src/mineplex/core/task/TaskClient.java index 44b1ce88b..22f565d58 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/task/TaskClient.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/task/TaskClient.java @@ -5,17 +5,10 @@ import java.util.List; public class TaskClient { - public String Name; public List TasksCompleted; - public TaskClient(String name) + public TaskClient() { - Name = name; TasksCompleted = new ArrayList(); } - - public String toString() - { - return Name + " Tasks: {" + TasksCompleted.toString() + "}"; - } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java b/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java index 297409df4..75f7bbe52 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/task/TaskManager.java @@ -1,42 +1,88 @@ package mineplex.core.task; -import org.bukkit.craftbukkit.libs.com.google.gson.Gson; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; +import java.util.UUID; + +import org.bukkit.Bukkit; import org.bukkit.entity.Player; -import org.bukkit.event.EventHandler; import org.bukkit.plugin.java.JavaPlugin; -import mineplex.core.MiniClientPlugin; -import mineplex.core.account.event.ClientWebResponseEvent; +import mineplex.core.MiniDbClientPlugin; +import mineplex.core.account.CoreClientManager; +import mineplex.core.common.util.Callback; +import mineplex.core.common.util.NautHashMap; import mineplex.core.task.repository.TaskRepository; -import mineplex.core.task.repository.TaskToken; -public class TaskManager extends MiniClientPlugin +public class TaskManager extends MiniDbClientPlugin { + private static Object _taskLock = new Object(); private TaskRepository _repository; - public TaskManager(JavaPlugin plugin, String webServerAddress) + private NautHashMap _tasks = new NautHashMap(); + + public TaskManager(JavaPlugin plugin, CoreClientManager clientManager, String webServerAddress) { - super("Task Manager", plugin); + super("Task Manager", plugin, clientManager); - _repository = new TaskRepository(webServerAddress); + _repository = new TaskRepository(plugin); + updateTasks(); } + private void updateTasks() + { + List tasks = _repository.retrieveTasks(); + + synchronized (_taskLock) + { + for (Task task : tasks) + { + _tasks.put(task.Name, task.Id); + } + } + } + @Override protected TaskClient AddPlayer(String playerName) { - return new TaskClient(playerName); + return new TaskClient(); } - @EventHandler - public void OnClientWebResponse(ClientWebResponseEvent event) + public void addTaskForOfflinePlayer(final Callback callback, final UUID uuid, final String task) { - TaskToken token = new Gson().fromJson(event.GetResponse(), TaskToken.class); - TaskClient client = new TaskClient(token.Name); - - if (token.TasksCompleted != null) - client.TasksCompleted = token.TasksCompleted; - - Set(token.Name, client); + Bukkit.getServer().getScheduler().runTaskAsynchronously(getPlugin(), new Runnable() + { + public void run() + { + synchronized (_taskLock) + { + if (!_tasks.containsKey(task)) + { + _repository.addTask(task); + System.out.println("TaskManager Adding Task : " + task); + } + } + + updateTasks(); + + synchronized (_taskLock) + { + final boolean success = _repository.addAccountTask(ClientManager.getCachedClientAccountId(uuid), _tasks.get(task)); + + if (callback != null) + { + Bukkit.getServer().getScheduler().runTask(getPlugin(), new Runnable() + { + public void run() + { + callback.run(success); + } + }); + } + } + } + }); } public boolean hasCompletedTask(Player player, String taskName) @@ -44,11 +90,41 @@ public class TaskManager extends MiniClientPlugin return Get(player.getName()).TasksCompleted.contains(taskName); } - public void completedTask(Player player, String taskName) + public void completedTask(final Callback callback, final Player player, final String taskName) { - TaskClient client = Get(player.getName()); - client.TasksCompleted.add(taskName); + Get(player.getName()).TasksCompleted.add(taskName); - _repository.AddTask(client.Name, taskName); + addTaskForOfflinePlayer(new Callback() + { + public void run(Boolean success) + { + if (!success) + { + System.out.println("Add task FAILED for " + player.getName()); + + if (_tasks.containsKey(taskName)) + { + Get(player.getName()).TasksCompleted.remove(taskName); + } + } + + if (callback != null) + { + callback.run(success); + } + } + }, player.getUniqueId(), taskName); + } + + @Override + public void processLoginResultSet(String playerName, ResultSet resultSet) throws SQLException + { + Set(playerName, _repository.loadClientInformation(resultSet)); + } + + @Override + public String getQuery(int accountId, String uuid, String name) + { + return "SELECT taskId FROM accountTasks WHERE accountId = '" + accountId + "';"; } } diff --git a/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java b/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java index 0d79ba3f0..82d7d6d22 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/task/repository/TaskRepository.java @@ -1,22 +1,79 @@ package mineplex.core.task.repository; -import mineplex.core.server.remotecall.AsyncJsonWebCall; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; -public class TaskRepository +import org.bukkit.plugin.java.JavaPlugin; + +import mineplex.core.database.DBPool; +import mineplex.core.database.RepositoryBase; +import mineplex.core.database.ResultSetCallable; +import mineplex.core.database.column.ColumnInt; +import mineplex.core.database.column.ColumnVarChar; +import mineplex.core.task.Task; +import mineplex.core.task.TaskClient; + +public class TaskRepository extends RepositoryBase { - private String _webAddress; + private static String ADD_ACCOUNT_TASK = "INSERT INTO accountTasks (accountId, taskId) VALUES (?, ?);"; - public TaskRepository(String webServerAddress) + private static String ADD_TASK = "INSERT INTO tasks (name) VALUES (?);"; + private static String RETRIEVE_TASKS = "SELECT id, name FROM tasks;"; + + public TaskRepository(JavaPlugin plugin) { - _webAddress = webServerAddress; + super(plugin, DBPool.ACCOUNT); } - public void AddTask(String name, String newTask) + @Override + protected void initialize() { - UpdateTaskToken token = new UpdateTaskToken(); - token.Name = name; - token.NewTaskCompleted = newTask; + } + + @Override + protected void update() + { + } + + public boolean addAccountTask(int accountId, int taskId) + { + return executeUpdate(ADD_ACCOUNT_TASK, new ColumnInt("accountId", accountId), new ColumnInt("taskId", taskId)) > 0; + } + + public TaskClient loadClientInformation(ResultSet resultSet) throws SQLException + { + final TaskClient taskClient = new TaskClient(); + + while (resultSet.next()) + { + taskClient.TasksCompleted.add(resultSet.getString(1)); + } - new AsyncJsonWebCall(_webAddress + "PlayerAccount/AddTask").Execute(token); + return taskClient; + } + + public List retrieveTasks() + { + final List tasks = new ArrayList(); + + executeQuery(RETRIEVE_TASKS, new ResultSetCallable() + { + public void processResultSet(ResultSet resultSet) throws SQLException + { + while (resultSet.next()) + { + tasks.add(new Task(resultSet.getInt(1), resultSet.getString(2))); + } + } + }); + + return tasks; + } + + public void addTask(String task) + { + executeUpdate(ADD_TASK, new ColumnVarChar("name", 100, task)); } } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java index 7e4dc80e3..2e655c5a9 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/Hub.java @@ -118,7 +118,7 @@ public class Hub extends JavaPlugin implements IRelation PartyManager partyManager = new PartyManager(this, portal, clientManager, preferenceManager); - HubManager hubManager = new HubManager(this, blockRestore, clientManager, donationManager, new ConditionManager(this), disguiseManager, new TaskManager(this, webServerAddress), portal, partyManager, preferenceManager, petManager, pollManager, statsManager, achievementManager, new HologramManager(this)); + HubManager hubManager = new HubManager(this, blockRestore, clientManager, donationManager, new ConditionManager(this), disguiseManager, new TaskManager(this, clientManager, webServerAddress), portal, partyManager, preferenceManager, petManager, pollManager, statsManager, achievementManager, new HologramManager(this)); QueueManager queueManager = new QueueManager(this, clientManager, donationManager, new EloManager(this, clientManager), partyManager); diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java index 49d3d603e..b63561b50 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/modules/ParkourManager.java @@ -390,18 +390,25 @@ public class ParkourManager extends MiniPlugin { final ParkourData fData = data; - _donationManager.RewardGems(new Callback() + _taskManager.completedTask(new Callback() { public void run(Boolean completed) { - UtilPlayer.message(player, F.main("Parkour", "You received " + F.elem(C.cGreen + fData.Gems + " Gems") + ".")); + _donationManager.RewardGems(new Callback() + { + public void run(Boolean completed) + { + UtilPlayer.message(player, F.main("Parkour", "You received " + F.elem(C.cGreen + fData.Gems + " Gems") + ".")); - _taskManager.completedTask(player, fData.Name); + //Sound + player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f); + } + }, "Parkour " + fData.Name, player.getName(), player.getUniqueId(), fData.Gems); //Sound player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f); } - }, "Parkour " + data.Name, player.getName(), player.getUniqueId(), data.Gems); + }, player, fData.Name); } } } diff --git a/Plugins/Mineplex.Hub/src/mineplex/hub/tutorial/TutorialManager.java b/Plugins/Mineplex.Hub/src/mineplex/hub/tutorial/TutorialManager.java index d48dc2be4..733bf058b 100644 --- a/Plugins/Mineplex.Hub/src/mineplex/hub/tutorial/TutorialManager.java +++ b/Plugins/Mineplex.Hub/src/mineplex/hub/tutorial/TutorialManager.java @@ -129,16 +129,22 @@ public class TutorialManager extends MiniPlugin //Gems if (!_taskManager.hasCompletedTask(player, tut.GetTask())) { - _donationManager.RewardGems(new Callback() + _taskManager.completedTask(new Callback() { public void run(Boolean completed) { - UtilPlayer.message(player, F.main("Tutorial", "You received " + F.elem(C.cGreen + tut.GetGems() + " Gems") + ".")); - _taskManager.completedTask(player, tut.GetTask()); - //Sound - player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f); + _donationManager.RewardGems(new Callback() + { + public void run(Boolean completed) + { + UtilPlayer.message(player, F.main("Tutorial", "You received " + F.elem(C.cGreen + tut.GetGems() + " Gems") + ".")); + + //Sound + player.playSound(player.getLocation(), Sound.LEVEL_UP, 2f, 1.5f); + } + }, "Tutorial " + tut.GetTutName(), player.getName(), player.getUniqueId(), tut.GetGems()); } - }, "Tutorial " + tut.GetTutName(), player.getName(), player.getUniqueId(), tut.GetGems()); + }, player, tut.GetTask()); } } } diff --git a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/Utility.java b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/Utility.java index b848f99cd..bb64b0b2e 100644 --- a/Plugins/Mineplex.ServerData/src/mineplex/serverdata/Utility.java +++ b/Plugins/Mineplex.ServerData/src/mineplex/serverdata/Utility.java @@ -112,7 +112,9 @@ public class Utility */ public static JedisPool generatePool(ConnectionData connData) { - return new JedisPool(new JedisPoolConfig(), connData.getHost(), connData.getPort()); + JedisPoolConfig jedisPoolConfig = new JedisPoolConfig(); + jedisPoolConfig.setMaxWaitMillis(10); + return new JedisPool(jedisPoolConfig, connData.getHost(), connData.getPort()); } /** diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java index 8c69eddb5..632552f4a 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/ArcadeManager.java @@ -252,7 +252,7 @@ public class ArcadeManager extends MiniPlugin implements IRelation _partyManager = new PartyManager(plugin, portal, _clientManager, preferences); _statsManager = new StatsManager(plugin, clientManager); - _taskManager = new TaskManager(plugin, webAddress); + _taskManager = new TaskManager(plugin, clientManager, webAddress); _achievementManager = new AchievementManager(_statsManager, clientManager, donationManager); _inventoryManager = inventoryManager; _cosmeticManager = cosmeticManager; diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java index 6e1b295da..9997234f9 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameAchievementManager.java @@ -106,14 +106,20 @@ public class GameAchievementManager implements Listener " " + F.elem(C.cGreen + C.Bold + "+" + type.getGemReward() + " Gems")); player.playSound(player.getLocation(), Sound.LEVEL_UP, 1f, 1f); - - Manager.GetDonation().RewardGems(new Callback() + + Manager.GetTaskManager().completedTask(new Callback() { public void run(Boolean completed) { - Manager.GetTaskManager().completedTask(player, type.getName()); + Manager.GetDonation().RewardGems(new Callback() + { + public void run(Boolean completed) + { + + } + }, type.getName(), player.getName(), player.getUniqueId(), type.getGemReward()); } - }, type.getName(), player.getName(), player.getUniqueId(), type.getGemReward()); + }, player, type.getName()); } else { diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 2b103f237324a6eaa86dfcf9c60f6b65c8c18b4b..082599a5290fc00d2b32583da99071c4353f3f2e 100644 GIT binary patch delta 12904 zcma)j4O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oEC6DXF#~ED*GooqX8R!;T)q-MBFHIb8I%{}C z73<8^J;{4SJfHvwC!F?Rc~5ROm(#z$5}RrB9`iPJb13O`^JstbmW;)@J89QuGdKM8 z;g8HT`pqFRgoYe7-=~0sIYZ8m&DK7~-1Mo`@GmidUTOuqjXh?TDiA!^XSlYm`k$dq zIqE+YIBq_=snz7va@iVBzP|wqpFU}g4Hca-f5$d`Zdz&DhvF7}t5usD zZ$fuZwr)UqmdrtCzQJNpaT--2&~Z>qWy1hBt*7x2B|uQ(X%qj?fbK&-F>3Z{r**$K zN2q*<67`ZB~LkjcO8^1D-?EyEE5^QcMo)y7ncehKer%CnYHQJ!^< zI&2U=(bG8r9;J%WD0TP}>fjIs3M2K|7so!AR^O=TJLCm`X9VrNY~lomu4M}E3vVz~ z{qibSG;+rkb9*Gaw)L@Ju+Uz^>H|Rk$IPQ;qpS}>d}u}y?eYwA7oo2LuYcW zF>Hs=`ucNyUcDnd^Orx~n7ZS~x8B+|@R|0(a{Z7S$v?!fkuQ!pcbu{2j~BOhW*1f5 I-edLu0zwrrKL7v# From aee0952c17accb117e183b0c4fb812f42853140c Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Tue, 12 May 2015 18:59:22 -0700 Subject: [PATCH 2/6] Added methods to convert tasks. --- Website/LOC.Core/LOC.Core.csproj | 1 + Website/LOC.Core/Tokens/AccountTask.cs | 13 + .../Models/AccountAdministrator.cs | 21 + .../Models/IAccountAdministrator.cs | 2 + .../Controllers/PlayerAccountController.cs | 9 + .../LOC.Website.Web.Publish.xml | 458 +++++++++--------- Website/LOCWebsite.suo | Bin 474624 -> 474624 bytes 7 files changed, 275 insertions(+), 229 deletions(-) create mode 100644 Website/LOC.Core/Tokens/AccountTask.cs diff --git a/Website/LOC.Core/LOC.Core.csproj b/Website/LOC.Core/LOC.Core.csproj index b1fdf484f..a52e4b798 100644 --- a/Website/LOC.Core/LOC.Core.csproj +++ b/Website/LOC.Core/LOC.Core.csproj @@ -78,6 +78,7 @@ + diff --git a/Website/LOC.Core/Tokens/AccountTask.cs b/Website/LOC.Core/Tokens/AccountTask.cs new file mode 100644 index 000000000..85dd2914e --- /dev/null +++ b/Website/LOC.Core/Tokens/AccountTask.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace LOC.Core.Tokens +{ + public class AccountTask + { + public string Task { get; set; } + public string UUID { get; set; } + } +} diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 5aa571908..8d0c23f74 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -72,6 +72,27 @@ return accounts; } + public List GetTasksByCount(int count) + { + var tasks = new List(); + + using (var repository = _repositoryFactory.CreateRepository()) + { + var gameTasks = repository.GetAll().OrderBy(x => x.GameTaskId).Take(count).Include(x => x.Account).ToList(); + + foreach (var task in gameTasks) + { + AccountTask accountTask = new AccountTask(); + accountTask.Task = task.TaskName; + accountTask.UUID = task.Account.Uuid; + + tasks.Add(accountTask); + } + } + + return tasks; + } + private object getAccountLock(string name) { object lockObject = null; diff --git a/Website/LOC.Website.Common/Models/IAccountAdministrator.cs b/Website/LOC.Website.Common/Models/IAccountAdministrator.cs index a79c19552..afcb11d4e 100644 --- a/Website/LOC.Website.Common/Models/IAccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/IAccountAdministrator.cs @@ -41,5 +41,7 @@ bool CoinReward(GemRewardToken token); ClientToken GetAccountByUUID(string uuid); + + List GetTasksByCount(int count); } } diff --git a/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs b/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs index 820a8212a..1f6e02b55 100644 --- a/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs +++ b/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs @@ -39,6 +39,15 @@ return Content(json, "application/json"); } + [HttpPost] + public ActionResult GetTasksByCount(int count) + { + var tasks = _accountAdministrator.GetTasksByCount(count); + + var json = JsonConvert.SerializeObject(tasks); + return Content(json, "application/json"); + } + [HttpPost] public ActionResult GetAccountByUUID(string uuid) { diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index 2d91aaa08..72e6fb292 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,12 +1,12 @@  - + @@ -19,51 +19,48 @@ - - + + - - - + - + - + - - - + - - + + + @@ -74,24 +71,24 @@ - - + - - + + + + - @@ -99,7 +96,7 @@ - + @@ -107,19 +104,18 @@ - + - + - - + @@ -128,20 +124,20 @@ - + - - + - + + - + @@ -155,43 +151,49 @@ - + + + + + + - + + - + - + - + + - @@ -201,7 +203,7 @@ - + @@ -209,65 +211,61 @@ - + - + - + + - + - + - - + - - + + - - + - + - + - - + + - - + + - - + - - @@ -281,38 +279,42 @@ - + - + + + - + - + - + + + - + @@ -322,7 +324,7 @@ - + @@ -333,20 +335,22 @@ + - + + + - - + @@ -354,8 +358,6 @@ - - @@ -363,44 +365,40 @@ - - + + - - - - + + - - + + - - @@ -411,126 +409,126 @@ - + - - - - + - - + - + + - + - + - + + - + + - + + - + - + - - + + - + - + + - + - + + - - + + - + - - + + - + - - - - - + + + + + - + - - @@ -546,48 +544,49 @@ - + + - + - + - + - + - + - + - + - + @@ -598,32 +597,34 @@ + - + + - + + - - + - - + + @@ -631,39 +632,36 @@ - + - - - + - - + - - + + + - - + @@ -674,33 +672,32 @@ - + - - - - + - - + - - - + + + + + + @@ -708,92 +705,93 @@ - + + - + + - + - + - - + + - + - + - - + + - + - + - + + - - + + - + - - + + - + - - - - - + + + + + - + - - @@ -809,38 +807,39 @@ - + + - + - + - + - + - + - + @@ -850,7 +849,7 @@ - + @@ -861,28 +860,30 @@ + - + + - + + - - + @@ -894,39 +895,36 @@ - + - - - + - - + - - + + + - - + @@ -937,33 +935,32 @@ - + - - - - + - - + - + + + + @@ -971,85 +968,88 @@ - + + - + + - + - + - - + + - + - + - - + + - + - + + - - + + - + - - + + - + - - - - - + + + + + - + \ No newline at end of file diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 082599a5290fc00d2b32583da99071c4353f3f2e..2fd6e5bcf8dbd57713aa32d8462604010f22f6e4 100644 GIT binary patch delta 12917 zcmaKTeO#1P`ab78=NX7_8Yg54k;ajbSi+GdBO;s#4asms@`cPsGV-gX6B3#)IFk96 z(Z~UAw`~p0+}v8jw5D%shHTrqeM-@7cdd-5tjv7Dmo+QX?{&_@OZ)rd*XKhq56?W$ zIrqzTU-xyNf)^8m7ZY0^5_Z=!-@VlDsdi>WL_`EH?pP>l9Bj{yA7YnAv+Ny@UAr<< zIw!=*V2O*~af^I%EfEg+<_~$4{HakyKE`6CV?w<2{E$t_a||aro?sKn|1TCLn=iQ8 z8}jt+gLk+}OQZWm)z0epVA8!~)?7FB^J>YeNA75y_IUCY5wm$j#5}y4SUykPQT6y* zP7QC_rcu{cmQjDfBhQ_$q59*zP`dInu{YH9*I^^5_M103VkNDUid2oGsxGN*FlTkeJ zDvGJJIl_N5%os-Pp2#oAA89tru0taz{afbP@yzclk|^`vET29}Hu6auzmEc( zMaylw@PzrijQl_IOzFt6$(&twDZVbNzax>#C&Dh?SIn#(qj$f_4(l*C|Cp;nN zHmy^eb4teuzx+5qIWi*R5bRMW8QnphXGNNP_oACM(8j;xP0fdlELnWfMh6?2PkL_l zl5d5ui-?HN894@t3Q9T7oYMA{Lmv4cQMyih!ug-t=CB=e{#tL7Uz|>(;4~2>%a3Hp zn`k+%+9PW|uu<|lo=cv`SuE`z&!fpc-f)`7;hZ)({KAw?`{Jm6 zjmV;@FR}z#^S+CcComs{X7LPibr`9#{Vz7`*+=aaW(l@8h59EOBSmS%aZau%9&5$M z>g!pe%sXbI`j5DiTz9h(P1hN*^m2l5@q3tTJ-U#U(8f*d7U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: [PATCH 3/6] Updates for task conversion. --- .../mineplex/chestConverter/AccountTask.java | 7 + .../chestConverter/AsyncJsonWebCall.java | 63 +++ .../chestConverter/ChestConverter.java | 32 +- .../ChestConverterRepository.java | 240 ++-------- .../mineplex/chestConverter/JsonWebCall.java | 359 ++++++++++++++ .../mineplex/chestConverter/SearchConf.java | 13 + Website/LOC.Core/LOC.Core.csproj | 1 + Website/LOC.Core/SearchConf.cs | 13 + .../Models/AccountAdministrator.cs | 4 +- .../Models/IAccountAdministrator.cs | 3 +- .../Controllers/PlayerAccountController.cs | 5 +- .../LOC.Website.Web.Publish.xml | 444 +++++++++--------- Website/LOCWebsite.suo | Bin 474624 -> 474624 bytes 13 files changed, 757 insertions(+), 427 deletions(-) create mode 100644 Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java create mode 100644 Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java create mode 100644 Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java create mode 100644 Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java create mode 100644 Website/LOC.Core/SearchConf.cs diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java new file mode 100644 index 000000000..f9433b184 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java @@ -0,0 +1,7 @@ +package mineplex.chestConverter; + +public class AccountTask +{ + public String Task; + public String UUID; +} diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java new file mode 100644 index 000000000..63e3812e3 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AsyncJsonWebCall.java @@ -0,0 +1,63 @@ +package mineplex.chestConverter; + +import mineplex.core.common.util.Callback; + +public class AsyncJsonWebCall extends JsonWebCall +{ + public AsyncJsonWebCall(String url) + { + super(url); + } + + public void Execute() + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(); + } + }); + + asyncThread.start(); + } + + public void Execute(final Object argument) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(argument); + } + }); + + asyncThread.start(); + } + + public void Execute(final Class callbackClass, final Callback callback) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(callbackClass, callback); + } + }); + + asyncThread.start(); + } + + public void Execute(final Class callbackClass, final Callback callback, final Object argument) + { + Thread asyncThread = new Thread(new Runnable() + { + public void run() + { + AsyncJsonWebCall.super.Execute(callbackClass, callback, argument); + } + }); + + asyncThread.start(); + } +} diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java index a9ddea664..98be01049 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java @@ -1,8 +1,10 @@ package mineplex.chestConverter; import java.text.SimpleDateFormat; +import java.util.ArrayList; import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.logging.Logger; public class ChestConverter @@ -13,29 +15,41 @@ public class ChestConverter public static void main (String args[]) { _repository = new ChestConverterRepository(); - int count = 5000; + int count = 0; + int batchAmount = 5000; + + HashMap tasks = _repository.getTaskList(); while (true) { long time = System.currentTimeMillis(); - HashMap playerMap = _repository.retrieveKeyInventoryBatch(count); + HashMap> playerMap = new HashMap>(); - if (playerMap.size() == 0) + + List taskList = _repository.getTasks(count, batchAmount); + + if (taskList.size() == 0) return; - _repository.incrementClient(playerMap, false); - _repository.deleteKeys(count); + for (AccountTask task : taskList) + { + if (!playerMap.containsKey(task.UUID)) + playerMap.put(task.UUID, new ArrayList()); + + playerMap.get(task.UUID).add(tasks.get(task.Task)); + } + + _repository.incrementClients(playerMap); try { - log("Natural sleep. " + count + " took " + (System.currentTimeMillis() - time) / 1000 + " seconds."); - Thread.sleep(250); + count += batchAmount; + log("Natural sleep. " + batchAmount + " took " + (System.currentTimeMillis() - time) / 1000 + " seconds. Count = " + + count); + Thread.sleep(100); } catch (InterruptedException e) { e.printStackTrace(); } - - break; } } diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java index 0970b1b4e..302a6ef0e 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java @@ -5,23 +5,20 @@ import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Statement; +import java.util.ArrayList; import java.util.HashMap; +import java.util.List; import java.util.Map.Entry; public class ChestConverterRepository { - private String _connectionString = "jdbc:mysql://db.mineplex.com:3306/Account"; + private String _connectionString = "jdbc:mysql://db.mineplex.com:3306/Account?allowMultiQueries=true"; private String _userName = "root"; private String _password = "tAbechAk3wR7tuTh"; - private static String RETRIEVE_CHESTS = "SELECT A.uuid, count FROM accountInventory INNER JOIN accounts AS A ON A.id = accountInventory.accountId WHERE itemId = 56 AND count > 0 ORDER BY accountInventory.id LIMIT ?;"; - private static String RETRIEVE_KEYS = "SELECT A.uuid, count FROM accountInventory INNER JOIN accounts AS A ON A.id = accountInventory.accountId WHERE itemId = 67 AND count > 0 ORDER BY accountInventory.id LIMIT ?;"; - - private static String DELETE_CHESTS = "DELETE FROM accountInventory WHERE itemId = 56 ORDER BY accountInventory.id LIMIT ?"; - private static String DELETE_KEYS = "DELETE FROM accountInventory WHERE itemId = 67 ORDER BY accountInventory.id LIMIT ?"; - - private static String INSERT_CLIENT_INVENTORY = "INSERT INTO accountInventory (accountId, itemId, count) SELECT accounts.id, ?, ? FROM accounts WHERE accounts.uuid = ? ON DUPLICATE KEY UPDATE count=count + VALUES(count);"; - private static String UPDATE_CLIENT_INVENTORY = "UPDATE accountInventory AS AI INNER JOIN accounts ON AI.accountId = accounts.id SET AI.count = AI.count + ? WHERE accounts.uuid = ? AND AI.itemId = ?;"; + private static String ADD_ACCOUNT_TASK = "INSERT INTO accountTasks (accountId, taskId) VALUES (?, ?);"; + private static String RETRIEVE_TASKS = "SELECT id, name FROM tasks;"; private static Connection _connection; @@ -56,24 +53,24 @@ public class ChestConverterRepository } } - public HashMap retrieveChestInventoryBatch(int count) + public HashMap getTaskList() { - HashMap playerList = new HashMap(); - + HashMap tasks = new HashMap(); PreparedStatement preparedStatement = null; try { if (_connection == null || _connection.isClosed()) _connection = DriverManager.getConnection(_connectionString, _userName, _password); + + preparedStatement = _connection.prepareStatement(RETRIEVE_TASKS); + preparedStatement.execute(); - preparedStatement = _connection.prepareStatement(RETRIEVE_CHESTS); - preparedStatement.setInt(1, count); - ResultSet resultSet = preparedStatement.executeQuery(); + ResultSet resultSet = preparedStatement.getResultSet(); while (resultSet.next()) { - playerList.put(resultSet.getString(1), resultSet.getInt(2)); + tasks.put(resultSet.getString(2), resultSet.getInt(1)); } } catch (Exception exception) @@ -95,133 +92,64 @@ public class ChestConverterRepository } } - return playerList; + return tasks; } - public HashMap retrieveKeyInventoryBatch(int count) + public List getTasks(int skip, int count) + { + return new JsonWebCall("http://accounts.mineplex.com/PlayerAccount/GetTasksByCount").Execute(new com.google.gson.reflect.TypeToken>(){}.getType(), new SearchConf(skip, count)); + } + + public void incrementClients(HashMap> playerList) { - HashMap playerList = new HashMap(); - PreparedStatement preparedStatement = null; + Statement statement = null; try { if (_connection == null || _connection.isClosed()) _connection = DriverManager.getConnection(_connectionString, _userName, _password); - preparedStatement = _connection.prepareStatement(RETRIEVE_KEYS); - preparedStatement.setInt(1, count); - ResultSet resultSet = preparedStatement.executeQuery(); - - while (resultSet.next()) + statement = _connection.createStatement(); + HashMap> playerIdList = new HashMap>(); + String queryString = ""; + for (Entry> entry : playerList.entrySet()) { - playerList.put(resultSet.getString(1), resultSet.getInt(2)); + queryString += "SELECT id FROM accounts WHERE accounts.uuid = '" + entry.getKey() + "' LIMIT 1;"; } - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) + + statement.execute(queryString); + statement.getUpdateCount(); + + for (Entry> entry : playerList.entrySet()) { - try + ResultSet resultSet = statement.getResultSet(); + + while (resultSet.next()) { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); + for (Integer taskId : entry.getValue()) + { + if (!playerIdList.containsKey(resultSet.getInt(1))) + playerIdList.put(resultSet.getInt(1), new ArrayList()); + + playerIdList.get(resultSet.getInt(1)).add(taskId); + } } + statement.getMoreResults(); } - } - - return playerList; - } - - public void incrementClient(HashMap playerList, boolean chest) - { - PreparedStatement preparedStatement = null; - - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - preparedStatement = _connection.prepareStatement(UPDATE_CLIENT_INVENTORY); - - for (Entry entry : playerList.entrySet()) + preparedStatement = _connection.prepareStatement(ADD_ACCOUNT_TASK); + System.out.println("adding to mysql db."); + for (Entry> entry : playerIdList.entrySet()) { - preparedStatement.setInt(1, entry.getValue()); - preparedStatement.setString(2, entry.getKey()); - preparedStatement.setInt(3, chest ? 690 : 692); - - preparedStatement.addBatch(); - - if (chest) + for (Integer taskId : entry.getValue()) { - if (entry.getValue() > 20) - { - preparedStatement.setInt(1, 1); - preparedStatement.setString(2, entry.getKey()); - preparedStatement.setInt(3, 692); - - preparedStatement.addBatch(); - } - - if (entry.getValue() > 50) - { - preparedStatement.setInt(1, 1); - preparedStatement.setString(2, entry.getKey()); - preparedStatement.setInt(3, 691); - - preparedStatement.addBatch(); - } + preparedStatement.setInt(1, entry.getKey()); + preparedStatement.setInt(2, taskId); + preparedStatement.addBatch(); } } - int[] rowsAffected = preparedStatement.executeBatch(); - int i = 0; - - preparedStatement.close(); - preparedStatement = _connection.prepareStatement(INSERT_CLIENT_INVENTORY); - - for (Entry entry : playerList.entrySet()) - { - if (rowsAffected[i] < 1) - { - preparedStatement.setInt(1, chest ? 690 : 692); - preparedStatement.setInt(2, entry.getValue()); - preparedStatement.setString(3, entry.getKey()); - - preparedStatement.addBatch(); - - if (chest) - { - if (entry.getValue() > 20) - { - preparedStatement.setInt(1, 692); - preparedStatement.setInt(2, 1); - preparedStatement.setString(3, entry.getKey()); - - preparedStatement.addBatch(); - } - - if (entry.getValue() > 50) - { - preparedStatement.setInt(1, 691); - preparedStatement.setInt(2, 1); - preparedStatement.setString(3, entry.getKey()); - - preparedStatement.addBatch(); - } - } - } - - i++; - } - preparedStatement.executeBatch(); } catch (Exception exception) @@ -243,74 +171,4 @@ public class ChestConverterRepository } } } - - public void deleteChests(int count) - { - PreparedStatement preparedStatement = null; - - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(DELETE_CHESTS); - preparedStatement.setInt(1, count); - preparedStatement.executeUpdate(); - - System.out.println("Deleting " + count + " inventory records."); - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - } - - public void deleteKeys(int count) - { - PreparedStatement preparedStatement = null; - - try - { - if (_connection == null || _connection.isClosed()) - _connection = DriverManager.getConnection(_connectionString, _userName, _password); - - preparedStatement = _connection.prepareStatement(DELETE_KEYS); - preparedStatement.setInt(1, count); - preparedStatement.executeUpdate(); - - System.out.println("Deleting " + count + " inventory records."); - } - catch (Exception exception) - { - exception.printStackTrace(); - } - finally - { - if (preparedStatement != null) - { - try - { - preparedStatement.close(); - } - catch (SQLException e) - { - e.printStackTrace(); - } - } - } - } } diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java new file mode 100644 index 000000000..b16829d57 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java @@ -0,0 +1,359 @@ +package mineplex.chestConverter; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.Type; + +import mineplex.core.common.util.Callback; +import mineplex.core.common.util.UtilSystem; + +import org.apache.http.HttpResponse; +import org.apache.http.client.HttpClient; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.conn.scheme.PlainSocketFactory; +import org.apache.http.conn.scheme.Scheme; +import org.apache.http.conn.scheme.SchemeRegistry; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.DefaultHttpClient; +import org.apache.http.impl.conn.PoolingClientConnectionManager; +import org.apache.http.message.BasicHeader; +import org.apache.http.protocol.HTTP; + +import com.google.gson.Gson; + +public class JsonWebCall +{ + private String _url; + private PoolingClientConnectionManager _connectionManager; + + public JsonWebCall(String url) + { + _url = url; + + SchemeRegistry schemeRegistry = new SchemeRegistry(); + schemeRegistry.register(new Scheme("http", 80, PlainSocketFactory.getSocketFactory())); + + _connectionManager = new PoolingClientConnectionManager(schemeRegistry); + _connectionManager.setMaxTotal(200); + _connectionManager.setDefaultMaxPerRoute(20); + } + + public String ExecuteReturnStream(Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null) + { + in = response.getEntity().getContent(); + result = convertStreamToString(in); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + System.out.println("Result: \n" + result); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + + return result; + } + + public void Execute() + { + Execute((Object)null); + } + + public void Execute(Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + + try + { + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + httpClient.execute(request); + } + catch (Exception ex) + { + System.out.println("JsonWebCall.Execute() Error:\n" + ex.getMessage()); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + } + + public T Execute(Class returnClass) + { + return Execute(returnClass, (Object)null); + } + + public T Execute(Type returnType, Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + T returnData = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null) + { + in = response.getEntity().getContent(); + + result = convertStreamToString(in); + returnData = new Gson().fromJson(result, returnType); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + System.out.println("Result: \n" + result); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + + return returnData; + } + + public T Execute(Class returnClass, Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + T returnData = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null) + { + in = response.getEntity().getContent(); + + result = convertStreamToString(in); + returnData = new Gson().fromJson(result, returnClass); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + System.out.println("Result: \n" + result); + + for (StackTraceElement trace : ex.getStackTrace()) + { + System.out.println(trace); + } + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + + return returnData; + } + + public void Execute(Class callbackClass, Callback callback) + { + Execute(callbackClass, callback, (Object)null); + } + + public void Execute(Class callbackClass, Callback callback, Object argument) + { + HttpClient httpClient = new DefaultHttpClient(_connectionManager); + InputStream in = null; + String result = null; + + try + { + HttpResponse response; + + Gson gson = new Gson(); + HttpPost request = new HttpPost(_url); + + if (argument != null) + { + StringEntity params = new StringEntity(gson.toJson(argument)); + params.setContentType(new BasicHeader(HTTP.CONTENT_TYPE, "application/json")); + request.setEntity(params); + } + + response = httpClient.execute(request); + + if (response != null && callback != null) + { + in = response.getEntity().getContent(); + + result = convertStreamToString(in); + callback.run(new Gson().fromJson(result, callbackClass)); + } + } + catch (Exception ex) + { + System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); + UtilSystem.printStackTrace(ex.getStackTrace()); + System.out.println("Result: \n" + result); + } + finally + { + httpClient.getConnectionManager().shutdown(); + + if (in != null) + { + try + { + in.close(); + } + catch (IOException e) + { + e.printStackTrace(); + } + } + } + } + + protected String convertStreamToString(InputStream is) + { + BufferedReader reader = new BufferedReader(new InputStreamReader(is)); + StringBuilder sb = new StringBuilder(); + + String line = null; + try { + while ((line = reader.readLine()) != null) { + sb.append(line + "\n"); + } + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + return sb.toString(); + } +} diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java new file mode 100644 index 000000000..36c80fa46 --- /dev/null +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java @@ -0,0 +1,13 @@ +package mineplex.chestConverter; + +public class SearchConf +{ + public SearchConf(int skip, int count) + { + Skip = skip; + Count = count; + } + + public int Skip; + public int Count; +} diff --git a/Website/LOC.Core/LOC.Core.csproj b/Website/LOC.Core/LOC.Core.csproj index a52e4b798..c4601f0a9 100644 --- a/Website/LOC.Core/LOC.Core.csproj +++ b/Website/LOC.Core/LOC.Core.csproj @@ -76,6 +76,7 @@ + diff --git a/Website/LOC.Core/SearchConf.cs b/Website/LOC.Core/SearchConf.cs new file mode 100644 index 000000000..b6489ca78 --- /dev/null +++ b/Website/LOC.Core/SearchConf.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; + +namespace LOC.Core +{ + public class SearchConf + { + public int Skip { get; set; } + public int Count { get; set; } + } +} diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 8d0c23f74..9d7bbd417 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -72,13 +72,13 @@ return accounts; } - public List GetTasksByCount(int count) + public List GetTasksByCount(SearchConf searchConf) { var tasks = new List(); using (var repository = _repositoryFactory.CreateRepository()) { - var gameTasks = repository.GetAll().OrderBy(x => x.GameTaskId).Take(count).Include(x => x.Account).ToList(); + var gameTasks = repository.GetAll().OrderBy(x => x.GameTaskId).Skip(searchConf.Skip).Take(searchConf.Count).Include(x => x.Account).ToList(); foreach (var task in gameTasks) { diff --git a/Website/LOC.Website.Common/Models/IAccountAdministrator.cs b/Website/LOC.Website.Common/Models/IAccountAdministrator.cs index afcb11d4e..1e6a1522f 100644 --- a/Website/LOC.Website.Common/Models/IAccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/IAccountAdministrator.cs @@ -6,6 +6,7 @@ using Core.Model.Sales; using Core.Tokens; using Core.Tokens.Client; + using LOC.Core; public interface IAccountAdministrator { @@ -42,6 +43,6 @@ ClientToken GetAccountByUUID(string uuid); - List GetTasksByCount(int count); + List GetTasksByCount(SearchConf searchConf); } } diff --git a/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs b/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs index 1f6e02b55..fe4efc6a9 100644 --- a/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs +++ b/Website/LOC.Website.Web/Controllers/PlayerAccountController.cs @@ -9,6 +9,7 @@ using Core.Tokens.Client; using Newtonsoft.Json; using System.Collections.Generic; + using LOC.Core; public class PlayerAccountController : Controller { @@ -40,9 +41,9 @@ } [HttpPost] - public ActionResult GetTasksByCount(int count) + public ActionResult GetTasksByCount(SearchConf searchConf) { - var tasks = _accountAdministrator.GetTasksByCount(count); + var tasks = _accountAdministrator.GetTasksByCount(searchConf); var json = JsonConvert.SerializeObject(tasks); return Content(json, "application/json"); diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index 72e6fb292..4d7cdc038 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,12 +1,12 @@  + - @@ -17,8 +17,10 @@ - + + + @@ -26,8 +28,8 @@ - + @@ -41,26 +43,27 @@ - + + + + - + - - - + @@ -71,32 +74,32 @@ - + + - - + - - - + + + - - + + @@ -104,40 +107,41 @@ - - + - + - + - + + + - + - + + - - + @@ -148,53 +152,49 @@ - + - - - - + - - - + + - - + - + - - + + - + + @@ -203,72 +203,74 @@ - - + + - + - + - - + - + - + - + + - + - + - - + + - + - - + + - - + + - + + + @@ -281,40 +283,36 @@ - - - + + - - + - + - - + - @@ -323,8 +321,9 @@ + - + @@ -335,22 +334,21 @@ - - + - - + + @@ -358,6 +356,8 @@ + + @@ -365,17 +365,17 @@ + - + - @@ -383,22 +383,22 @@ + - + - - - + + - + @@ -409,62 +409,64 @@ - + - + + + + + + - - + - + - + - - + - - - + + - + - + @@ -472,66 +474,66 @@ - - + + - + - - + + - - + - - + - - + + - - + + - + - - - - - + + + + + - + + + @@ -542,24 +544,24 @@ - + - - + - + - + + @@ -569,14 +571,13 @@ - + - @@ -586,7 +587,7 @@ - + @@ -597,22 +598,20 @@ - - + + - - - + @@ -620,18 +619,22 @@ + - - + + + - + + + @@ -645,89 +648,87 @@ + - + - + - - - + - - + - + + + + + + - - - + - + - - - + - + - - + - + - + - + @@ -735,66 +736,67 @@ - + - + - - - - + + + - + - + - - + - - + + + - - + + - + - - - - - + + + + + - + + + @@ -805,24 +807,24 @@ - + - - + - + - + + @@ -832,14 +834,13 @@ - + - @@ -849,7 +850,7 @@ - + @@ -860,22 +861,20 @@ - - + + - - - + @@ -883,6 +882,7 @@ + @@ -891,10 +891,13 @@ + - + + + @@ -908,89 +911,87 @@ + - + - + - - - + - - + - + + + + + + - - - - - + - + - - + - + - + - + @@ -998,58 +999,57 @@ - + - + - - + + - - + - - + - - + + + - - + + - + - - - - - + + + + + - + \ No newline at end of file diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index 2fd6e5bcf8dbd57713aa32d8462604010f22f6e4..f7fc529703b0807da0c414400d7716a22e1b8ec4 100644 GIT binary patch delta 14218 zcmZu&4Oo;_+MaXX^S&UCG!n8zh!Y_Z5sfSvAF((RDk0*CWQaeZBAK~{%37(}Xs((W zAxGzN%?w?aTDLWl)^S_X@n?5kKT|BXEhC&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4>xW+lI$ABqkh0oF;hSan zvI5!~qm1~Tnm!*E^<^9JGQ*noL&<95l?t;B7p?zEcgkh=e7hpQzv?x(Bt;*&^Jjf| zXo$pF`G;0>!)}p6(Czpmo0saSZ?NuMO zX3tU7YEODQwi_GZ96PuWqwb&RB7Y+Uc`QA%IoEKSrBeZ8qtWFGyJpzr7x#i@{uHAQl&^gEW7#v6?

?BpMbt@mXb#ni3^k0bZJ#t2Ft5Il)0 RGK>^4YkJk3&1J^t{}-M@(C`2N From 5bb91f41671e35a80219e3ddb3bcce0aea2237c7 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Wed, 13 May 2015 14:27:35 -0700 Subject: [PATCH 4/6] Catch null taskList --- .../src/mineplex/chestConverter/ChestConverter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java index 98be01049..b292eb238 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java @@ -28,7 +28,7 @@ public class ChestConverter List taskList = _repository.getTasks(count, batchAmount); - if (taskList.size() == 0) + if (taskList == null || taskList.size() == 0) return; for (AccountTask task : taskList) From a6cf1309ff0601e941be1353838e0f48c7287e23 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Wed, 13 May 2015 14:33:31 -0700 Subject: [PATCH 5/6] Fix for ranks not applying. --- .../core/account/CoreClientManager.java | 6 + .../Models/AccountAdministrator.cs | 2 +- .../LOC.Website.Web.Publish.xml | 444 +++++++++--------- 3 files changed, 229 insertions(+), 223 deletions(-) diff --git a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java index 88aafb1af..8ba8f1650 100644 --- a/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java +++ b/Plugins/Mineplex.Core/src/mineplex/core/account/CoreClientManager.java @@ -208,6 +208,12 @@ public class CoreClientManager extends MiniPlugin if (uuid == null) uuid = UUIDFetcher.getUUIDOf(playerName); + if (uuid == null) + { + System.out.println("ERROR uuid is null. Can't load client by name."); + return; + } + String response = _repository.getClientByUUID(uuid); token = gson.fromJson(response, ClientToken.class); diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 9d7bbd417..2c1f298ae 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -725,7 +725,7 @@ if (account == null) return "ALL"; - if (account.Rank.Name == "ADMIN" || account.Rank.Name == "OWNER" || account.Rank.Name == "DEVELOPER" || account.Rank.Name == "YOUTUBE") + if (account.Rank.Name == "LT" || account.Rank.Name == "OWNER") return account.Rank.Name; if (rank == null) diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index 4d7cdc038..71278577d 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,7 +1,6 @@  - @@ -19,51 +18,47 @@ - - + - + + - - + - + - + - - - - - + + @@ -74,32 +69,31 @@ - - + - + + - + + - - - - + + @@ -107,41 +101,43 @@ + + + - + - - - + - - - - + + + + - + + @@ -152,74 +148,80 @@ - + - + + + + + + - + - + - + - + + + - - - + - + - - + + - + - + - - - + + + + @@ -227,50 +229,47 @@ - + - - + - - + + - - - + + - + - - + + - - + + - + - + - @@ -281,16 +280,18 @@ - + + + - + @@ -304,6 +305,7 @@ + @@ -311,19 +313,16 @@ - + - - - @@ -334,30 +333,29 @@ + - - + + - - + + - - @@ -365,40 +363,45 @@ - + - - + + + + - + + + - - + + + - + @@ -409,131 +412,127 @@ - + - - - - + - - + - + - - + - - + + - + + - - + - - + + - - + + - - - + + + + - + - + + - + - + - - + + - + - - + + - - + + - + - + - @@ -546,22 +545,21 @@ - + + - - + - @@ -576,8 +574,8 @@ - + @@ -586,8 +584,8 @@ + - @@ -598,20 +596,23 @@ + - + + - + + @@ -619,85 +620,82 @@ - - - + + - + + - - - + - - + - + + - + + - + + - + - - - - + - - + - - - + + + + @@ -707,96 +705,97 @@ - + + - + + - - + - + - - + + - + - + - + + - + - + - + + - + - - + - - + + - + - - + + - - + + - + - + - @@ -809,22 +808,21 @@ - + + - - + - @@ -839,8 +837,8 @@ - + @@ -849,8 +847,8 @@ + - @@ -861,20 +859,23 @@ + - + + - + + @@ -882,7 +883,6 @@ - @@ -891,76 +891,74 @@ - + + - - - + - - + - + + - + + - + + - + - - - - + - - + - + + @@ -970,86 +968,88 @@ - + + - + + - - + - + - - + + - + - + + - + - + + - + - - + - - + + - + - - + + - - + + - + \ No newline at end of file From 47ff9101fda712c17b155b83b6a3be9a5614bbe5 Mon Sep 17 00:00:00 2001 From: Jonathan Williams Date: Sun, 17 May 2015 01:28:44 -0700 Subject: [PATCH 6/6] Finished up changes for game task conversion. --- Plugins/BuildFiles/common.xml | 4 +- .../mineplex/chestConverter/AccountTask.java | 1 + .../chestConverter/ChestConverter.java | 110 +++- .../ChestConverterRepository.java | 4 +- .../mineplex/chestConverter/JsonWebCall.java | 12 +- .../mineplex/chestConverter/SearchConf.java | 6 +- Website/LOC.Core/SearchConf.cs | 2 +- Website/LOC.Core/Tokens/AccountTask.cs | 1 + .../Models/AccountAdministrator.cs | 24 +- .../LOC.Website.Web.Publish.xml | 480 +++++++++--------- Website/LOCWebsite.suo | Bin 474624 -> 474624 bytes 11 files changed, 349 insertions(+), 295 deletions(-) diff --git a/Plugins/BuildFiles/common.xml b/Plugins/BuildFiles/common.xml index 06f154806..56ad32bcb 100644 --- a/Plugins/BuildFiles/common.xml +++ b/Plugins/BuildFiles/common.xml @@ -414,7 +414,7 @@ - + @@ -438,7 +438,7 @@ - + diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java index f9433b184..122dbc580 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/AccountTask.java @@ -2,6 +2,7 @@ package mineplex.chestConverter; public class AccountTask { + public int Id; public String Task; public String UUID; } diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java index b292eb238..ed9388f45 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverter.java @@ -1,10 +1,14 @@ package mineplex.chestConverter; +import java.io.IOException; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.logging.FileHandler; +import java.util.logging.Formatter; +import java.util.logging.LogRecord; import java.util.logging.Logger; public class ChestConverter @@ -12,45 +16,95 @@ public class ChestConverter private static ChestConverterRepository _repository = null; private static SimpleDateFormat _dateFormat = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss"); + private static Logger _logger = Logger.getLogger("Converter"); + public static void main (String args[]) { + try + { + FileHandler fileHandler = new FileHandler("converter.log", true); + fileHandler.setFormatter(new Formatter() + { + @Override + public String format(LogRecord record) + { + return record.getMessage() + "\n"; + } + }); + _logger.addHandler(fileHandler); + _logger.setUseParentHandlers(false); + } + catch (SecurityException | IOException e1) + { + e1.printStackTrace(); + } + _repository = new ChestConverterRepository(); - int count = 0; - int batchAmount = 5000; + int lastId = 11056929; + int count = 50000; + int numOfRowsProcessed = lastId; HashMap tasks = _repository.getTaskList(); - while (true) + try { - long time = System.currentTimeMillis(); - HashMap> playerMap = new HashMap>(); - - - List taskList = _repository.getTasks(count, batchAmount); - - if (taskList == null || taskList.size() == 0) - return; - - for (AccountTask task : taskList) + while (true) { - if (!playerMap.containsKey(task.UUID)) - playerMap.put(task.UUID, new ArrayList()); + long time = System.currentTimeMillis(); + HashMap> playerMap = new HashMap>(); - playerMap.get(task.UUID).add(tasks.get(task.Task)); - } - - _repository.incrementClients(playerMap); - try - { - count += batchAmount; - log("Natural sleep. " + batchAmount + " took " + (System.currentTimeMillis() - time) / 1000 + " seconds. Count = " + + count); - Thread.sleep(100); - } - catch (InterruptedException e) - { - e.printStackTrace(); + + List taskList = _repository.getTasks(lastId, count); + + if (taskList != null && taskList.size() > 0) + { + for (AccountTask task : taskList) + { + if (!playerMap.containsKey(task.UUID)) + playerMap.put(task.UUID, new ArrayList()); + + playerMap.get(task.UUID).add(tasks.get(task.Task)); + + if (task.Id > lastId) + lastId = task.Id; + } + + _repository.incrementClients(playerMap); + try + { + numOfRowsProcessed += count; + log("Natural sleep. " + count + " took " + (System.currentTimeMillis() - time) / 1000 + " seconds. Count = " + + numOfRowsProcessed); + Thread.sleep(100); + } + catch (InterruptedException e) + { + e.printStackTrace(); + } + } + else if (numOfRowsProcessed > 17000000) + { + System.out.println("Count : " + numOfRowsProcessed); + _logger.info("Count : " + numOfRowsProcessed); + break; + } + else + { + System.out.println("No greater than 17 mil"); + _logger.info("No greater than 17 mil"); + System.out.println("Count : " + numOfRowsProcessed); + _logger.info("Count : " + numOfRowsProcessed); + } } } + catch (Exception e) + { + _logger.info(e.getMessage()); + } + finally + { + System.out.println("Count : " + numOfRowsProcessed); + _logger.info("Count : " + numOfRowsProcessed); + } } private static void log(String message) diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java index 302a6ef0e..fcb0107c6 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/ChestConverterRepository.java @@ -95,9 +95,9 @@ public class ChestConverterRepository return tasks; } - public List getTasks(int skip, int count) + public List getTasks(int lastId, int count) throws Exception { - return new JsonWebCall("http://accounts.mineplex.com/PlayerAccount/GetTasksByCount").Execute(new com.google.gson.reflect.TypeToken>(){}.getType(), new SearchConf(skip, count)); + return new JsonWebCall("http://accounts.mineplex.com/PlayerAccount/GetTasksByCount").Execute(new com.google.gson.reflect.TypeToken>(){}.getType(), new SearchConf(lastId, count)); } public void incrementClients(HashMap> playerList) diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java index b16829d57..2bfc6f765 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/JsonWebCall.java @@ -154,7 +154,7 @@ public class JsonWebCall return Execute(returnClass, (Object)null); } - public T Execute(Type returnType, Object argument) + public T Execute(Type returnType, Object argument) throws Exception { HttpClient httpClient = new DefaultHttpClient(_connectionManager); InputStream in = null; @@ -185,16 +185,6 @@ public class JsonWebCall returnData = new Gson().fromJson(result, returnType); } } - catch (Exception ex) - { - System.out.println("Error executing JsonWebCall: \n" + ex.getMessage()); - System.out.println("Result: \n" + result); - - for (StackTraceElement trace : ex.getStackTrace()) - { - System.out.println(trace); - } - } finally { httpClient.getConnectionManager().shutdown(); diff --git a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java index 36c80fa46..98fa721a5 100644 --- a/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java +++ b/Plugins/Mineplex.ChestConverter/src/mineplex/chestConverter/SearchConf.java @@ -2,12 +2,12 @@ package mineplex.chestConverter; public class SearchConf { - public SearchConf(int skip, int count) + public SearchConf(int idIndex, int count) { - Skip = skip; + IdIndex = idIndex; Count = count; } - public int Skip; + public int IdIndex; public int Count; } diff --git a/Website/LOC.Core/SearchConf.cs b/Website/LOC.Core/SearchConf.cs index b6489ca78..f0650fecc 100644 --- a/Website/LOC.Core/SearchConf.cs +++ b/Website/LOC.Core/SearchConf.cs @@ -7,7 +7,7 @@ namespace LOC.Core { public class SearchConf { - public int Skip { get; set; } + public int IdIndex { get; set; } public int Count { get; set; } } } diff --git a/Website/LOC.Core/Tokens/AccountTask.cs b/Website/LOC.Core/Tokens/AccountTask.cs index 85dd2914e..d245c9d08 100644 --- a/Website/LOC.Core/Tokens/AccountTask.cs +++ b/Website/LOC.Core/Tokens/AccountTask.cs @@ -7,6 +7,7 @@ namespace LOC.Core.Tokens { public class AccountTask { + public int Id { get; set; } public string Task { get; set; } public string UUID { get; set; } } diff --git a/Website/LOC.Website.Common/Models/AccountAdministrator.cs b/Website/LOC.Website.Common/Models/AccountAdministrator.cs index 2c1f298ae..e7912bfd2 100644 --- a/Website/LOC.Website.Common/Models/AccountAdministrator.cs +++ b/Website/LOC.Website.Common/Models/AccountAdministrator.cs @@ -76,19 +76,27 @@ { var tasks = new List(); - using (var repository = _repositoryFactory.CreateRepository()) + try { - var gameTasks = repository.GetAll().OrderBy(x => x.GameTaskId).Skip(searchConf.Skip).Take(searchConf.Count).Include(x => x.Account).ToList(); - - foreach (var task in gameTasks) + using (var repository = _repositoryFactory.CreateRepository()) { - AccountTask accountTask = new AccountTask(); - accountTask.Task = task.TaskName; - accountTask.UUID = task.Account.Uuid; + var gameTasks = repository.GetAll().Where(x => x.GameTaskId > searchConf.IdIndex).OrderBy(x => x.GameTaskId).Take(searchConf.Count).Include(x => x.Account).ToList(); - tasks.Add(accountTask); + foreach (var task in gameTasks) + { + AccountTask accountTask = new AccountTask(); + accountTask.Id = task.GameTaskId; + accountTask.Task = task.TaskName; + accountTask.UUID = task.Account.Uuid; + + tasks.Add(accountTask); + } } } + catch (Exception ex) + { + _logger.Log("ERROR", ex.Message + " : " + ex.StackTrace); + } return tasks; } diff --git a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml index 71278577d..a57f4f271 100644 --- a/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml +++ b/Website/LOC.Website.Web/LOC.Website.Web.Publish.xml @@ -1,11 +1,13 @@  + + @@ -16,18 +18,19 @@ - + - + + - - + + @@ -41,7 +44,7 @@ - + @@ -49,16 +52,18 @@ + + + - - + @@ -69,23 +74,24 @@ - + + - + + - - - + + @@ -93,7 +99,7 @@ - + @@ -101,43 +107,42 @@ - + - - + - + + - + + + - - - + - - - + + @@ -148,53 +153,47 @@ - + + - - - - + - - - + - - - + + - + - - - + + @@ -202,9 +201,9 @@ - + - + @@ -212,61 +211,62 @@ - + - - + + - - + - + - + + - - + + - + + - - + + - + - - + + - - + + - + + - @@ -282,47 +282,47 @@ - - + - + - - + - + - + + - + + @@ -333,29 +333,30 @@ - - + + - - + + - + + @@ -363,45 +364,40 @@ - + - + - - + - + - - - - - + - - + + @@ -412,29 +408,35 @@ - + - + + + + + + - - + + + @@ -442,94 +444,92 @@ - + - + - + + - - + - + - + - - + + - + - + - - + - + - - + - - + + - + - - + + - + - - - - - + + + + + - + + - @@ -543,9 +543,9 @@ - + - + @@ -553,29 +553,30 @@ - - + - + + + + - @@ -584,8 +585,8 @@ - + @@ -596,74 +597,70 @@ - - - + + - - - + + - + - - + + - + - - + + - + - - + - + - - + @@ -674,125 +671,128 @@ - + - + + + + + + - - - - + + + - + - + + - + - + - + + - - + - + - + - - + + - - + + - + - - + - + - + - - + - - + + - + - - + + - + - - - - - + + + + + - + + - @@ -806,9 +806,9 @@ - + - + @@ -816,29 +816,30 @@ - - + - + + + + - @@ -847,8 +848,8 @@ - + @@ -859,31 +860,29 @@ - - - + + - - - + + - + @@ -891,42 +890,40 @@ - + - - + + - + - - + - + - - + @@ -937,119 +934,122 @@ - + - + + + + + + - - + - + - + + - + - + - + + - - + - + - + - - + + - - + + - + - - + - + - - + - - + + - + - - + + - + - - - - - + + + + + - + \ No newline at end of file diff --git a/Website/LOCWebsite.suo b/Website/LOCWebsite.suo index f7fc529703b0807da0c414400d7716a22e1b8ec4..933119909849f609174782de9c4efc849fdfb493 100644 GIT binary patch delta 226 zcmZqpBh&ClWay<7U5i&(Z7u`mX%pYA-D(Ww3FW=0@p0%B$$X4(FAGi$Ii zOF9z+!*oU`CXMYS*I6$V3UEJ@QREhO4Cp=bcIT~|?`}>vv}P2U9&n6_Z?c~b*YpNY zwqjoQnamx9E9V@U82a@4@#zhdS(Uacd9kUnup}W2^J5EOPd?0I*#2cRBM>tIF*6XeZ2z*EHAI;u zg^7V-I-?Vl#`coytQQIe>vY!su^afA1 zV%}4(hyDL-m-qj|^KHA{^oGf-O52sZ*wk29(h-LFu>~-4BmwzK3@{76__O)5b24NC z1+!rar