mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-02 19:42:05 -04:00
Finished the crafting start window system. Added PassiveGuildleveQuests and refactors the Quest object. Cleaned up how zone music is handled.
This commit is contained in:
parent
f4e2280de8
commit
605b4918e2
471
Data/scripts/commands/CraftCommand.lua
Normal file
471
Data/scripts/commands/CraftCommand.lua
Normal file
@ -0,0 +1,471 @@
|
||||
--[[
|
||||
|
||||
CraftJudge
|
||||
|
||||
Operates the Crafting system.
|
||||
|
||||
Functions:
|
||||
|
||||
loadTextData()
|
||||
Desc: Loads all gamesheets needed and instantiates a CraftJudge.
|
||||
Params: None
|
||||
|
||||
start(facility, requestsMode, material1, material2, material3, material4, material5, material6, material7, material8)
|
||||
Desc: Opens the Craft Start widget, with any preloaded materials. Widget has two modes; one for normal synthesis and another
|
||||
for local leve "requested items" mode.
|
||||
Params: * facility - The current facility id buff the player may have.
|
||||
* requestMode - If true, switches the UI to Requested Items mode otherwise it opens Normal Synthesis mode.
|
||||
* material1-8 - ItemID for each of the 8 material slots. If empty, they must be set to 0 or the client will crash.
|
||||
|
||||
closeCraftStartWidget()
|
||||
Desc: Closes the Craft Start widget.
|
||||
Params: None
|
||||
|
||||
selectRcp(itemId)
|
||||
Desc: Selects the recipe to be crafted. May be a legacy function but still required to properly initialize the UI. Requires start() to have
|
||||
been called.
|
||||
Params: * itemId - The itemID of the item to be crafted.
|
||||
|
||||
confirmRcp(craftedItem, quantity, crystalItem1, crystalQuantity1, crystalQuantity1, crystalItem2, crystalQuantity2, recommendedSkill, recommendedFacility)
|
||||
Desc: Opens the confirmation window, detailing what is needed and the item that will be created. Requires a selectRcp() call first.
|
||||
Params: * craftedItem - The itemID of the item to be crafted.
|
||||
* quantity - Quantity of crafted items.
|
||||
* crystalItem1 - The first required crystal itemID for crafting.
|
||||
* crystalQuantity1 - Quantity of the first crystal.
|
||||
* crystalItem2 - The second required crystal itemID for crafting.
|
||||
* crystalQuantity2 - Quantity of the second crystal.
|
||||
* recommendedSkill - Which itemID to display under the "Recommended Skill" panel.
|
||||
* recommendedFacility - Which facility to display under the "Recommended Facility" panel.
|
||||
|
||||
selectCraftQuest()
|
||||
Desc: Opens the journal to select the local leve that the player would like to do.
|
||||
Params: None
|
||||
|
||||
askContinueLocalLeve(localLeveID, craftedItem, itemsCompleted, craftTotal, attempts)
|
||||
Desc: Opens the dialog to continue crafting for a local leve after an item was completed.
|
||||
Params: * localLeveID - The id of the current leve in progress.
|
||||
* craftedItem - The current crafted item id.
|
||||
* itemsCompleted - Number of items crafted so far.
|
||||
* craftTotal - Number of items to be crafted in total.
|
||||
* attempts - The number of attempts left.
|
||||
|
||||
askRetryLocalleve(localLeveID, allowanceCount)
|
||||
Desc: Opens the dialog to retry the local leve (at the expense of an allowance) if the player had failed it.
|
||||
Params: * localLeveID - The failed level id.
|
||||
* allowanceCount - How many allowances the player has.
|
||||
|
||||
openCraftProgressWidget(durability, quality, hqChance)
|
||||
Desc: Opens the crafting minigame, sets starting values.
|
||||
Params: * durability - Durability of the current item.
|
||||
* quality - Starting quality of the current item.
|
||||
* hqChance - Starting chance to get a HQ item.
|
||||
|
||||
craftCommandUI(classID, hasWait, command1, command2, command3, command4, command5)
|
||||
Desc: Sets the available command list and waits for the player to select a command.
|
||||
Params:
|
||||
* classID - The current crafting class. Must be set properly to show the three synthesis commands.
|
||||
* hasWait - If true, adds the wait command.
|
||||
* command1-5 - Five possible crafting commands (crafting skills).
|
||||
|
||||
craftTuningUI(command1, command2, command3, command4, command5, command6, command7, command8)
|
||||
Desc: Displays a full list of commands for the legacy "Tuning" phase that happens after crafting. Deprecated in 1.23b.
|
||||
Params: * command1-8 - The list of commands available.
|
||||
|
||||
updateInfo(progress, durability, quality, tuningItem, tuningItemQuality, tuningItemQuantity, hqChance)
|
||||
Desc: Updates the progress UI components and text boxes.
|
||||
Params: * progress - The current crafting progress percentage. Value is from 0 to 100.
|
||||
* durability - The current durability of the crafted item.
|
||||
* quality - The current quality of the crafted item.
|
||||
* tuningItem - The crafted item to show in the Tuning UI. Nil if crafting. Deprecated in 1.23b.
|
||||
* tuningItemQuality - The quality of the item to show in the Tuning UI. Nil if crafting. Deprecated in 1.23b.
|
||||
* tuningItemQuantity - The amount of the item to show in the Tuning UI. Nil if crafting. Deprecated in 1.23b.
|
||||
* hqChance - The current chance of an HQ craft.
|
||||
|
||||
closeCraftProgressWidget()
|
||||
Desc: Closes the crafting minigame widget.
|
||||
Params: None
|
||||
|
||||
cfmQst()
|
||||
Desc: Quest confirmation window for when starting a crafting quest from the journal.
|
||||
Params:
|
||||
|
||||
confirmLeve()
|
||||
Desc: Opens the summery page for the local leve.
|
||||
Params: * localLeveID - The quest id of the leve you are confirming.
|
||||
* difficulty - Changes the objective.
|
||||
* craftedItem? -
|
||||
* ? -
|
||||
* numSuccess - The number of successful crafts you did.
|
||||
* remainingMaterials - The number of materials you have left.
|
||||
* hasMaterials - Shows the in-progress panel of successes and attempts left.
|
||||
* ? -
|
||||
|
||||
startRepair(craftMode, item, quality, durability, hasMateria, spiritbind)
|
||||
Desc: Opens the repair item widget.
|
||||
Params: * craftMode - Either 0 or 1. Anything else crashes.
|
||||
* item - ItemID of the item to be repaired.
|
||||
* quality - Quality of the item to be repaired.
|
||||
* durability - Durability of the item to be repaired.
|
||||
* hasMateria - Shows an icon if the item to be repaired has materia attached.
|
||||
* spiritbind - Spiritbind of the item to be repaired.
|
||||
|
||||
askJoinMateria()
|
||||
displayRate()
|
||||
|
||||
askJoinResult(isSuccess, item, itemQuality, materia, materiaNumber, isSpiritBound)
|
||||
Desc: Opens the result widget after materia melding is done.
|
||||
Params: * isSuccess - True if the meld was successful.
|
||||
* item - Item ID of the melded item.
|
||||
* quality - Quality of the melded item.
|
||||
* materia - Item ID of the materia being melded.
|
||||
* materiaNumber - Total count of materia on the item.
|
||||
* isSpiritBound - True if the item is spiritbound. Causes icon to appear.
|
||||
|
||||
Notes:
|
||||
|
||||
Class ID + Starting skill
|
||||
29 CRP = 22550
|
||||
30 BSM = 22556
|
||||
31 ARM = 22562
|
||||
32 GSM = 22568
|
||||
33 LTW = 22574
|
||||
34 WVR = 22580
|
||||
35 ALC = 22586
|
||||
36 CUL = 22592
|
||||
|
||||
Leve objectives/rewards are in passiveGL_craft.
|
||||
|
||||
* Index 1:
|
||||
* Index 2: Recommended Class
|
||||
* Index 3: Issuing Authority
|
||||
* Index 7: Levequest Location
|
||||
* Index 8: Deliver Display Name
|
||||
* Starts at index 14. Four sections for the four difficulties.
|
||||
* Required Item, Amount, ?, Recommended Level, , Reward Item, Reward Amount, |
|
||||
|
||||
--]]
|
||||
|
||||
require ("global")
|
||||
|
||||
local skillAnim = {
|
||||
[22553] = 0x10002000;
|
||||
[22554] = 0x10001000;
|
||||
[22555] = 0x10003000;
|
||||
[29531] = 0x10009002;
|
||||
}
|
||||
|
||||
function onEventStarted(player, commandactor, triggerName, arg1, arg2, arg3, arg4, checkedActorId)
|
||||
local MENU_CANCEL, MENU_MAINHAND, MENU_OFFHAND, MENU_REQUEST = 0, 1, 2, 3;
|
||||
local MENU_RECENT, MENU_AWARDED, MENU_RECENT_DETAILED, MENU_AWARDED_DETAILED = 7, 8, 9, 10;
|
||||
|
||||
local debugMessage = false;
|
||||
|
||||
local craftStartWidgetOpen = false;
|
||||
local isRecipeRecentSent = false;
|
||||
local isRecipeAwardSent = false;
|
||||
|
||||
local craftJudge = GetStaticActor("CraftJudge");
|
||||
local recipeResolver = GetRecipeResolver();
|
||||
|
||||
local chosenOperation;
|
||||
local recipeMode;
|
||||
local chosenMaterials;
|
||||
|
||||
local facilityId = 0;
|
||||
local isRequestedItemsMode = false; -- False = The default state. True = User picked a quest recipe/local leve
|
||||
local recentRecipes;
|
||||
local awardedRecipes;
|
||||
|
||||
local currentCraftQuest = nil; -- Use this to store any chosen craft quest
|
||||
local currentCraftQuestGuildleve = nil; -- Use this to store any chosen local leve
|
||||
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "loadTextData", commandactor);
|
||||
|
||||
player:ChangeState(30);
|
||||
|
||||
while chosenOperation ~= 0 do
|
||||
|
||||
if debugMessage then player:SendMessage(0x20, "", "[DEBUG] Menu ID: "..tostring(chosenOperation).." Recipe : "..tostring(recipeMode).." Quest : "..chosenQuest); end
|
||||
|
||||
-- Operate the start crafting window... confusing shit
|
||||
if (craftStartWidgetOpen == false) then
|
||||
-- Shows the initial window
|
||||
local startMats = {0, 0, 0, 0, 0, 0, 0, 0};
|
||||
if (isRequestedItemsMode == true) then -- If requested items, preload the quest recipe materials
|
||||
startMats = recipeResolver.RecipeToMatIdTable(currentCraftQuestGuildleve.getRecipe());
|
||||
end
|
||||
chosenOperation, recipeMode = callClientFunction(player, "delegateCommand", craftJudge, "start", commandactor, facilityId, isRequestedItemsMode, unpack(startMats));
|
||||
craftStartWidgetOpen = true;
|
||||
elseif ((chosenOperation == MENU_RECENT or chosenOperation == MENU_AWARDED) and recipeMode != 0) then
|
||||
local prepedMaterials;
|
||||
-- Recent Recipes/Awarded Recipes
|
||||
if (chosenOperation == MENU_RECENT) then
|
||||
prepedMaterials = recipeResolver.RecipeToMatIdTable(recentRecipes[recipeMode]);
|
||||
else
|
||||
prepedMaterials = recipeResolver.RecipeToMatIdTable(awardedRecipes[recipeMode]);
|
||||
end
|
||||
-- Causes the item info window to appear for recent/awarded recipes. Only happens if a recipe was chosen.
|
||||
chosenOperation, recipeMode = callClientFunction(player, "delegateCommand", craftJudge, "start", commandactor, -2, isRequestedItemsMode, unpack(prepedMaterials));
|
||||
else
|
||||
-- Keep window going if the user "returned" to the starting point
|
||||
chosenOperation, recipeMode = callClientFunction(player, "delegateCommand", craftJudge, "start", commandactor, -1, isRequestedItemsMode);
|
||||
end
|
||||
|
||||
-- Operation
|
||||
if chosenOperation == MENU_CANCEL then
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "closeCraftStartWidget", commandactor);
|
||||
elseif (chosenOperation == MENU_MAINHAND or chosenOperation == MENU_OFFHAND) then
|
||||
-- Recipe choosing loop
|
||||
while (true) do
|
||||
-- Choosing a recipe from the given materials
|
||||
local recipes = recipeResolver.GetRecipeFromMats();
|
||||
local itemIds = recipeResolver.RecipesToItemIdTable(recipes);
|
||||
local chosenRecipeIndex = callClientFunction(player, "delegateCommand", craftJudge, "selectRcp", commandactor, unpack(itemIds));
|
||||
|
||||
-- Hit back on recipe list
|
||||
if (chosenRecipeIndex <= 0) then break end;
|
||||
|
||||
chosenRecipe = recipes[chosenRecipeIndex-1];
|
||||
|
||||
if (chosenRecipe ~= nil) then
|
||||
-- Player confirms recipe
|
||||
local recipeConfirmed = callClientFunction(player, "delegateCommand", craftJudge, "confirmRcp", commandactor,
|
||||
chosenRecipe.resultItemID,
|
||||
chosenRecipe.resultQuantity,
|
||||
chosenRecipe.crystalId1,
|
||||
chosenRecipe.crystalQuantity1,
|
||||
chosenRecipe.crystalId2,
|
||||
chosenRecipe.crystalQuantity2,
|
||||
0,
|
||||
0);
|
||||
|
||||
if recipeConfirmed then
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "closeCraftStartWidget", commandactor);
|
||||
isRecipeRecentSent = false;
|
||||
isRecipeAwardSent = false;
|
||||
currentlyCrafting = startCrafting(player, chosenOperation, chosenRecipe, isRequestedItemsMode, 80, 100, 50);
|
||||
break;
|
||||
end
|
||||
end
|
||||
end
|
||||
-- End of Recipe choosing loops
|
||||
elseif chosenOperation == MENU_REQUEST then -- Conditional button label based on isRequestedItemsMode
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "closeCraftStartWidget", commandactor);
|
||||
craftStartWidgetOpen = false;
|
||||
|
||||
if isRequestedItemsMode == false then -- "Request Items" hit, close Start and open up the Quest select
|
||||
isRecipeRecentSent = false;
|
||||
isRecipeAwardSent = false;
|
||||
|
||||
local quest = getCraftQuest(player, craftJudge, commandactor);
|
||||
if (quest ~= nil) then
|
||||
isRequestedItemsMode = true;
|
||||
if (quest.isCraftPassiveGuildleve()) then
|
||||
currentCraftQuestGuildleve = quest;
|
||||
else
|
||||
currentCraftQuest = quest;
|
||||
end
|
||||
end
|
||||
elseif isRequestedItemsMode == true then -- "Normal Synthesis" button hit
|
||||
isRequestedItemsMode = false;
|
||||
currentCraftQuestGuildleve = nil;
|
||||
currentCraftQuest = nil;
|
||||
end
|
||||
elseif chosenOperation == MENU_RECENT then -- "Recipes" button hit
|
||||
if isRecipeRecentSent == false then
|
||||
recentRecipes = player.GetRecentRecipes();
|
||||
local itemIds = recipeResolver.RecipesToItemIdTable(recentRecipes);
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "selectRcp", commandactor, unpack(itemIds)); -- Load up recipe list
|
||||
isRecipeRecentSent = true;
|
||||
end
|
||||
elseif chosenOperation == MENU_AWARDED then -- "Awarded Recipes" tab hit
|
||||
if isRecipeAwardSent == false then
|
||||
awardedRecipes = player.GetAwardedRecipes();
|
||||
local itemIds = recipeResolver.RecipesToItemIdTable(awardedRecipes);
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "selectRcp", commandactor, unpack(itemIds)); -- Load up Award list
|
||||
isRecipeAwardSent = true;
|
||||
end
|
||||
elseif ((chosenOperation == MENU_RECENT_DETAILED or chosenOperation == MENU_AWARDED_DETAILED) and recipeMode > 0) then -- Pop-up for an item's stats/craft mats on a recent recipe
|
||||
local chosenRecipe = chosenOperation == MENU_RECENT_DETAILED and recentRecipes[recipeMode-1] or recentRecipes[awardedMode-1];
|
||||
local recipeConfirmed = callClientFunction(player, "delegateCommand", craftJudge, "confirmRcp", commandactor,
|
||||
chosenRecipe.resultItemID,
|
||||
chosenRecipe.resultQuantity,
|
||||
chosenRecipe.crystalId1,
|
||||
chosenRecipe.crystalQuantity1,
|
||||
chosenRecipe.crystalId2,
|
||||
chosenRecipe.crystalQuantity2,
|
||||
0,
|
||||
0);
|
||||
if (recipeConfirmed) then
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "closeCraftStartWidget", commandactor);
|
||||
isRecipeRecentSent = false;
|
||||
isRecipeAwardSent = false;
|
||||
currentlyCrafting = startCrafting(player, chosenOperation, chosenRecipe, isRequestedItemsMode, 80, 100, 50);
|
||||
end
|
||||
else
|
||||
break;
|
||||
end
|
||||
end
|
||||
|
||||
player:ResetMusic();
|
||||
player:ChangeState(0);
|
||||
player:EndEvent();
|
||||
end
|
||||
|
||||
-- Handles the menus to pick a crafter quest or local leve quest that run separate widgets from the Start command.
|
||||
-- Returns whether a quest was selected, and what id the quest is.
|
||||
function getCraftQuest(player, craftJudge, commandactor);
|
||||
local questId = nil;
|
||||
|
||||
while (true) do
|
||||
local questCommandId = callClientFunction(player, "delegateCommand", craftJudge, "selectCraftQuest", commandactor);
|
||||
|
||||
if questCommandId then
|
||||
questId = questCommandId - 0xA0F00000;
|
||||
|
||||
if isCraftQuest(questId) then
|
||||
local quest = player.GetQuest(questId);
|
||||
local confirm = callClientFunction(player, "delegateCommand", craftJudge, "cfmQst", commandactor, quest.getQuestId(), 20, 1, 1, 1, 0, 0, "<Path Companion>");
|
||||
if confirm == true then
|
||||
player:SendGameMessage(craftJudge, 21, 0x20);
|
||||
return quest;
|
||||
end
|
||||
elseif isLocalLeve(questId) then
|
||||
local difficulty = 0;
|
||||
local hasMaterials = 1;
|
||||
|
||||
local quest = player.getQuestGuildleve(questId);
|
||||
|
||||
if (quest ~= nil) then
|
||||
local confirm = callClientFunction(player, "delegateCommand", craftJudge, "confirmLeve", commandactor,
|
||||
quest.getQuestId(),
|
||||
quest.getCurrentDifficulty(),
|
||||
0,
|
||||
quest.getNumberOfSuccesses(),
|
||||
quest.getRemainingMaterials(),
|
||||
quest.hasMaterials() and 1 or 0, -- Fucked up way of doing terneries on Lua
|
||||
0
|
||||
);
|
||||
|
||||
if (confirm == true) then
|
||||
return quest;
|
||||
end
|
||||
else
|
||||
return nil; -- Shouldn't happen unless db corrupted
|
||||
end
|
||||
else
|
||||
-- TEMP for now. Cannot find source for what happens if you confirm a non-craft quest.
|
||||
player:SendGameMessage(GetWorldMaster(), 40209, 0x20);
|
||||
end
|
||||
else
|
||||
return nil;
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function isScenarioQuest(id)
|
||||
|
||||
if (id >= 110001 and id <= 120026) then
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function isCraftQuest(id)
|
||||
if (id >= 110300 and id <= 110505) then
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
function isLocalLeve(id)
|
||||
|
||||
if (id >= 120001 and id <= 120452) then
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- No real logic in this function. Just smoke and mirrors to 'see' the minigame in action at the minimum level.
|
||||
function startCrafting(player, hand, recipe, quest, startDur, startQly, startHQ)
|
||||
|
||||
local worldMaster = GetWorldMaster();
|
||||
local itemId = recipe.resultItemID;
|
||||
local progress = 0;
|
||||
local attempts = 5;
|
||||
local craftedCount = 0;
|
||||
local craftTotal = 2;
|
||||
|
||||
player:ChangeState(30+hand); -- Craft kneeling w/ appropriate tool out
|
||||
player:ChangeMusic(73);
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "openCraftProgressWidget", commandactor, startDur, startQly, startHQ);
|
||||
|
||||
while true do
|
||||
|
||||
local progDiff = math.random(30,50);
|
||||
local duraDiff = math.random(1,3);
|
||||
local qltyDiff = math.random(0,2);
|
||||
|
||||
if progress >= 100 then
|
||||
|
||||
player:SendGameMessage(GetWorldMaster(), 40111, 0x20, player, itemId, 3, 8); -- "You create <#3 quantity> <#1 item> <#2 quality>."
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "closeCraftProgressWidget", commandactor);
|
||||
|
||||
if quest then
|
||||
continueLeve = callClientFunction(player, "delegateCommand", craftJudge, "askContinueLocalLeve", 120001, itemId, craftedCount, craftTotal, attempts);
|
||||
|
||||
if continueLeve == true then
|
||||
progress = 0;
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "openCraftProgressWidget", commandactor, startDur, startQly, startHQ);
|
||||
else
|
||||
break;
|
||||
end
|
||||
else
|
||||
break;
|
||||
end
|
||||
end
|
||||
|
||||
choice = callClientFunction(player, "delegateCommand", craftJudge, "craftCommandUI", commandactor, 29, 2, 29530,29531,29532,29533,29534);
|
||||
--player:SendMessage(0x20, "", "[DEBUG] Command id selected: "..choice);
|
||||
|
||||
|
||||
|
||||
if choice then
|
||||
|
||||
if skillAnim[choice] then
|
||||
player:PlayAnimation(skillAnim[choice]);
|
||||
end
|
||||
|
||||
wait(3);
|
||||
|
||||
player:SendGameMessage(worldMaster, 40108, 0x20, choice,2);
|
||||
|
||||
if choice ~= 29531 then
|
||||
progress = progress + progDiff;
|
||||
|
||||
if progress >= 100 then
|
||||
progress = 100;
|
||||
end
|
||||
|
||||
startDur = startDur - duraDiff;
|
||||
startQly = startQly + qltyDiff;
|
||||
|
||||
player:SendGameMessage(worldMaster, 40102, 0x20, progDiff);
|
||||
player:SendGameMessage(worldMaster, 40103, 0x20, duraDiff);
|
||||
player:SendGameMessage(worldMaster, 40104, 0x20, qltyDiff);
|
||||
end
|
||||
--prg dur qly, ???, ???, ???, HQ
|
||||
callClientFunction(player, "delegateCommand", craftJudge, "updateInfo", commandactor, progress, startDur, startQly, nil, nil, nil, nil, nil);
|
||||
|
||||
--testChoice = callClientFunction(player, "delegateCommand", craftJudge, "craftTuningUI", commandactor, 29501, 24233, 29501,29501, 24223, 29501,12008,12004);
|
||||
end
|
||||
end
|
||||
|
||||
return -1;
|
||||
end
|
@ -21,7 +21,7 @@ function main(thisDirector)
|
||||
if (members ~= nil and #members ~= 0) then
|
||||
player = members[0];
|
||||
player:SendGameMessage(GetWorldMaster(), 50036, 0x20, thisDirector.guildleveId, player, 0); --"You have started the leve..."
|
||||
player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.borderId, guildleveData.plateId, false));
|
||||
player:PlayAnimation(getGLStartAnimationFromSheet(guildleveData.plateId, guildleveData.borderId, false));
|
||||
end
|
||||
|
||||
wait(3);
|
||||
|
@ -14,11 +14,11 @@ function glPlateIconIDToAnimID(iconId)
|
||||
return iconId - 20020;
|
||||
end
|
||||
|
||||
function getGLStartAnimationFromSheet(border, plate, isBoost)
|
||||
return getGLStartAnimation(glBorderIconIDToAnimID(border), glPlateIconIDToAnimID(plate), isBoost);
|
||||
function getGLStartAnimationFromSheet(plate, border, isBoost)
|
||||
return getGLStartAnimation(glPlateIconIDToAnimID(plate), glBorderIconIDToAnimID(border), isBoost);
|
||||
end
|
||||
|
||||
function getGLStartAnimation(border, plate, isBoost)
|
||||
function getGLStartAnimation(plate, border, isBoost)
|
||||
borderBits = border;
|
||||
plateBits = bit32.lshift(plate, 7);
|
||||
|
||||
|
@ -1,54 +1,34 @@
|
||||
-- MySQL dump 10.13 Distrib 5.7.10, for Win64 (x86_64)
|
||||
--
|
||||
-- Host: localhost Database: ffxiv_database
|
||||
-- ------------------------------------------------------
|
||||
-- Server version 5.7.10-log
|
||||
-- --------------------------------------------------------
|
||||
-- Host: 127.0.0.1
|
||||
-- Server version: 5.6.17 - MySQL Community Server (GPL)
|
||||
-- Server OS: Win64
|
||||
-- HeidiSQL Version: 10.1.0.5464
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
|
||||
/*!40103 SET TIME_ZONE='+00:00' */;
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
|
||||
|
||||
--
|
||||
-- Table structure for table `characters_quest_guildleve_local`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `characters_quest_guildleve_local`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `characters_quest_guildleve_local` (
|
||||
-- Dumping database structure for ffxiv_server
|
||||
CREATE DATABASE IF NOT EXISTS `ffxiv_server` /*!40100 DEFAULT CHARACTER SET latin1 */;
|
||||
USE `ffxiv_server`;
|
||||
|
||||
-- Dumping structure for table ffxiv_server.characters_quest_guildleve_local
|
||||
CREATE TABLE IF NOT EXISTS `characters_quest_guildleve_local` (
|
||||
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`characterId` int(10) unsigned NOT NULL,
|
||||
`slot` smallint(5) unsigned NOT NULL,
|
||||
`questId` int(10) unsigned NOT NULL,
|
||||
`questData` longtext,
|
||||
`abandoned` tinyint(1) unsigned DEFAULT '0',
|
||||
`completed` tinyint(1) DEFAULT '0',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Dumping data for table `characters_quest_guildleve_local`
|
||||
--
|
||||
|
||||
LOCK TABLES `characters_quest_guildleve_local` WRITE;
|
||||
/*!40000 ALTER TABLE `characters_quest_guildleve_local` DISABLE KEYS */;
|
||||
/*!40000 ALTER TABLE `characters_quest_guildleve_local` ENABLE KEYS */;
|
||||
UNLOCK TABLES;
|
||||
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
|
||||
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
|
||||
-- Data exporting was unselected.
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||||
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
||||
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
||||
|
||||
-- Dump completed on 2016-06-07 22:54:48
|
||||
|
File diff suppressed because it is too large
Load Diff
236
Data/sql/gamedata_passivegl_craft.sql
Normal file
236
Data/sql/gamedata_passivegl_craft.sql
Normal file
@ -0,0 +1,236 @@
|
||||
-- --------------------------------------------------------
|
||||
-- Host: 127.0.0.1
|
||||
-- Server version: 5.6.17 - MySQL Community Server (GPL)
|
||||
-- Server OS: Win64
|
||||
-- HeidiSQL Version: 10.1.0.5464
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
|
||||
-- Dumping database structure for ffxiv_server
|
||||
CREATE DATABASE IF NOT EXISTS `ffxiv_server` /*!40100 DEFAULT CHARACTER SET latin1 */;
|
||||
USE `ffxiv_server`;
|
||||
|
||||
-- Dumping structure for table ffxiv_server.gamedata_passivegl_craft
|
||||
DROP TABLE IF EXISTS `gamedata_passivegl_craft`;
|
||||
CREATE TABLE IF NOT EXISTS `gamedata_passivegl_craft` (
|
||||
`id` int(11) unsigned NOT NULL,
|
||||
`plateId` int(11) unsigned NOT NULL,
|
||||
`borderId` int(11) unsigned NOT NULL,
|
||||
`recommendedClass` int(11) NOT NULL,
|
||||
`issuingLocation` int(11) NOT NULL,
|
||||
`guildleveLocation` int(11) NOT NULL,
|
||||
`deliveryDisplayName` int(11) NOT NULL,
|
||||
`unk1` int(11) NOT NULL,
|
||||
`unk2` int(11) NOT NULL,
|
||||
`unk3` int(11) NOT NULL,
|
||||
`unk4` int(11) NOT NULL,
|
||||
`objectiveItemId1` int(11) NOT NULL,
|
||||
`objectiveQuantity1` int(11) NOT NULL,
|
||||
`numberOfAttempts1` int(11) NOT NULL,
|
||||
`recommendedLevel1` int(11) NOT NULL,
|
||||
`rewardItemId1` int(11) NOT NULL,
|
||||
`rewardQuantity1` int(11) NOT NULL,
|
||||
`objectiveItemId2` int(11) NOT NULL,
|
||||
`objectiveQuantity2` int(11) NOT NULL,
|
||||
`numberOfAttempts2` int(11) NOT NULL,
|
||||
`recommendedLevel2` int(11) NOT NULL,
|
||||
`rewardItemId2` int(11) NOT NULL,
|
||||
`rewardQuantity2` int(11) NOT NULL,
|
||||
`objectiveItemId3` int(11) NOT NULL,
|
||||
`objectiveQuantity3` int(11) NOT NULL,
|
||||
`numberOfAttempts3` int(11) NOT NULL,
|
||||
`recommendedLevel3` int(11) NOT NULL,
|
||||
`rewardItemId3` int(11) NOT NULL,
|
||||
`rewardQuantity3` int(11) NOT NULL,
|
||||
`objectiveItemId4` int(11) NOT NULL,
|
||||
`objectiveQuantity4` int(11) NOT NULL,
|
||||
`numberOfAttempts4` int(11) NOT NULL,
|
||||
`recommendedLevel4` int(11) NOT NULL,
|
||||
`rewardItemId4` int(11) NOT NULL,
|
||||
`rewardQuantity4` int(11) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Data about passiveGuildleves AKA Local Guildleves';
|
||||
|
||||
-- Dumping data for table ffxiv_server.gamedata_passivegl_craft: ~169 rows (approximately)
|
||||
/*!40000 ALTER TABLE `gamedata_passivegl_craft` DISABLE KEYS */;
|
||||
INSERT INTO `gamedata_passivegl_craft` (`id`, `plateId`, `borderId`, `recommendedClass`, `issuingLocation`, `guildleveLocation`, `deliveryDisplayName`, `unk1`, `unk2`, `unk3`, `unk4`, `objectiveItemId1`, `objectiveQuantity1`, `numberOfAttempts1`, `recommendedLevel1`, `rewardItemId1`, `rewardQuantity1`, `objectiveItemId2`, `objectiveQuantity2`, `numberOfAttempts2`, `recommendedLevel2`, `rewardItemId2`, `rewardQuantity2`, `objectiveItemId3`, `objectiveQuantity3`, `numberOfAttempts3`, `recommendedLevel3`, `rewardItemId3`, `rewardQuantity3`, `objectiveItemId4`, `objectiveQuantity4`, `numberOfAttempts4`, `recommendedLevel4`, `rewardItemId4`, `rewardQuantity4`) VALUES
|
||||
(120001, 20033, 20005, 1, 1, 1001, 1000333, 185, 186, 187, 188, 4040002, 2, 4, 5, 10002011, 3, 3910101, 72, 5, 10, 10002011, 3, 4030002, 4, 6, 15, 10002011, 3, 4040102, 5, 7, 25, 10002011, 3),
|
||||
(120002, 20033, 20005, 1, 1, 1001, 1000333, 101, 102, 103, 104, 10303101, 2, 4, 1, 10002011, 3, 10300011, 3, 5, 15, 10002011, 3, 10303109, 4, 6, 1, 10002011, 3, 10303103, 5, 7, 20, 10002011, 3),
|
||||
(120003, 20033, 20005, 1, 1, 1001, 1000333, 221, 222, 223, 224, 6020002, 2, 4, 5, 10002011, 3, 6021001, 3, 5, 10, 10002011, 3, 6020006, 4, 6, 5, 10002011, 3, 6020003, 5, 7, 25, 10002011, 3),
|
||||
(120004, 20033, 20005, 1, 1, 1001, 1000333, 29, 30, 31, 32, 0, 0, 4, 1, 10001004, 8, 0, 0, 5, 1, 10001004, 8, 10002002, 48, 6, 10, 10001004, 8, 0, 0, 7, 10, 10001004, 8),
|
||||
(120005, 20033, 20005, 30, 1051, 1014, 1400065, 361, 362, 363, 364, 4030001, 2, 4, 1, 6020004, 1, 4030001, 3, 5, 1, 8032501, 1, 4030001, 4, 6, 1, 8070320, 1, 4030001, 5, 7, 1, 8080615, 1),
|
||||
(120006, 20033, 20005, 34, 1051, 1014, 1400065, 361, 362, 363, 364, 8031315, 2, 4, 1, 6060008, 1, 8031315, 3, 5, 1, 8032501, 1, 8031315, 4, 6, 1, 8070320, 1, 8031315, 5, 7, 1, 8080615, 1),
|
||||
(120007, 20033, 20005, 29, 1051, 1014, 1400065, 361, 362, 363, 364, 10008203, 2, 4, 1, 6010009, 1, 10008203, 3, 5, 1, 8032501, 1, 10008203, 4, 6, 1, 8070320, 1, 10008203, 5, 7, 1, 8080615, 1),
|
||||
(120008, 20033, 20005, 33, 1051, 1014, 1400065, 361, 362, 363, 364, 8080615, 2, 4, 1, 6050009, 1, 8080615, 3, 5, 1, 8032501, 1, 8080615, 4, 6, 1, 8070320, 1, 8080615, 5, 7, 1, 8080615, 1),
|
||||
(120009, 20033, 20005, 31, 1051, 1014, 1400065, 361, 362, 363, 364, 10002071, 6, 4, 1, 6030009, 1, 10002071, 9, 5, 1, 8032501, 1, 10002071, 12, 6, 1, 8070320, 1, 10002071, 15, 7, 1, 8080615, 1),
|
||||
(120010, 20033, 20005, 32, 1051, 1014, 1400065, 361, 362, 363, 364, 9050052, 2, 4, 1, 6040009, 1, 9050052, 3, 5, 1, 8032501, 1, 9050052, 4, 6, 1, 8070320, 1, 9050052, 5, 7, 1, 8080615, 1),
|
||||
(120011, 20033, 20005, 35, 1051, 1014, 1400065, 361, 362, 363, 364, 10009308, 6, 4, 1, 6070009, 1, 10009308, 9, 5, 1, 8032501, 1, 10009308, 12, 6, 1, 8070320, 1, 10009308, 15, 7, 1, 8080615, 1),
|
||||
(120012, 20033, 20005, 36, 1051, 1014, 1400065, 361, 362, 363, 364, 3010202, 12, 4, 1, 6080009, 1, 3010202, 18, 5, 1, 8032501, 1, 3010202, 24, 6, 1, 8070320, 1, 3010202, 30, 7, 1, 8080615, 1),
|
||||
(120013, 20033, 20005, 30, 1051, 1510, 1400104, 333, 334, 335, 336, 10002012, 2, 4, 10, 10001004, 9, 10002013, 3, 5, 20, 10001004, 9, 10003015, 4, 6, 30, 10001010, 9, 10002015, 5, 7, 35, 10001013, 9),
|
||||
(120014, 20033, 20005, 30, 1051, 1509, 1900094, 329, 330, 331, 332, 10002072, 6, 4, 15, 10002012, 3, 10002073, 9, 5, 25, 10002013, 3, 10003074, 12, 6, 35, 10003015, 3, 10002074, 15, 7, 40, 10002015, 3),
|
||||
(120015, 20033, 20004, 30, 1051, 1509, 1000333, 325, 326, 327, 328, 4040106, 2, 4, 15, 10002012, 3, 4030115, 3, 5, 25, 10002013, 3, 4040206, 4, 6, 45, 10003015, 3, 4030506, 5, 7, 50, 10002015, 3),
|
||||
(120016, 20033, 20005, 34, 1051, 1510, 1400104, 333, 334, 335, 336, 8012011, 2, 4, 10, 10005201, 6, 8010910, 3, 5, 20, 10005005, 3, 8012014, 4, 6, 35, 10005020, 3, 8010620, 5, 7, 45, 10005025, 3),
|
||||
(120017, 20033, 20005, 29, 1051, 1510, 1400104, 333, 334, 335, 336, 7030009, 2, 4, 5, 10008203, 3, 7030104, 3, 5, 10, 10008205, 3, 3940107, 12, 6, 30, 10008207, 3, 7030107, 5, 7, 40, 10008211, 3),
|
||||
(120018, 20033, 20005, 33, 1051, 1510, 1400104, 333, 334, 335, 336, 8090503, 2, 4, 10, 10007104, 3, 8091106, 3, 5, 15, 10007104, 3, 8090902, 4, 6, 20, 10007126, 3, 8090204, 5, 7, 35, 10007116, 3),
|
||||
(120019, 20033, 20005, 31, 1051, 1510, 1400104, 333, 334, 335, 336, 8011605, 2, 4, 20, 10002022, 2, 8011606, 3, 5, 20, 10002022, 2, 8011607, 4, 6, 30, 10002023, 2, 8011607, 5, 7, 30, 10002023, 2),
|
||||
(120020, 20033, 20005, 31, 1051, 1509, 1900094, 329, 330, 331, 332, 8011710, 2, 4, 45, 10003025, 2, 8011710, 3, 5, 45, 10003025, 2, 8011712, 4, 6, 50, 10002024, 2, 8011712, 5, 7, 50, 10002024, 2),
|
||||
(120021, 20033, 20004, 31, 1051, 1509, 1000333, 325, 326, 327, 328, 8030320, 2, 4, 35, 10002053, 3, 8031720, 3, 5, 45, 10003055, 3, 8031722, 4, 6, 50, 10002054, 3, 8031722, 5, 7, 50, 10002054, 3),
|
||||
(120022, 20033, 20005, 32, 1051, 1510, 1400104, 333, 334, 335, 336, 8010808, 2, 4, 25, 10003013, 3, 8010210, 3, 5, 30, 10002023, 2, 8010833, 4, 6, 40, 10003015, 3, 8010823, 5, 7, 50, 10003014, 3),
|
||||
(120023, 20033, 20005, 35, 1051, 1510, 1400104, 333, 334, 335, 336, 10009314, 8, 4, 40, 3011224, 2, 10009314, 3, 5, 15, 3011102, 4, 10009315, 4, 6, 30, 10006005, 2, 10009315, 10, 7, 45, 10006007, 2),
|
||||
(120024, 20033, 20005, 36, 1051, 1509, 1900094, 329, 330, 331, 332, 3010605, 12, 4, 5, 3011451, 9, 3010605, 18, 5, 5, 3011451, 9, 3010611, 20, 6, 20, 3011452, 18, 3010607, 15, 7, 40, 3011455, 18),
|
||||
(120025, 20033, 20005, 36, 1051, 1509, 1900094, 329, 330, 331, 332, 3010007, 10, 4, 10, 3011309, 3, 3010108, 15, 5, 15, 3011101, 3, 3010010, 16, 6, 20, 3011006, 3, 3010308, 10, 7, 45, 3011310, 12),
|
||||
(120026, 20033, 20004, 36, 1051, 1510, 1400104, 333, 334, 335, 336, 3011501, 12, 4, 10, 3010609, 12, 3011504, 18, 5, 1, 3010604, 3, 3011505, 48, 6, 20, 3011008, 3, 3011535, 60, 7, 10, 3011506, 3),
|
||||
(120027, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120028, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120029, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120030, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120031, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120032, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120033, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120034, 20033, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002011, 3, 3020002, 3, 5, 1, 10002011, 3, 3020002, 4, 6, 1, 10002011, 3, 3020002, 5, 7, 1, 10002011, 3),
|
||||
(120035, 20034, 20005, 30, 1051, 1018, 1900056, 105, 107, 108, 106, 6010009, 2, 4, 5, 10002011, 3, 7020104, 3, 5, 10, 10002011, 3, 6010013, 4, 6, 35, 10002013, 3, 7020107, 5, 7, 45, 10003015, 3),
|
||||
(120036, 20034, 20005, 31, 1051, 1018, 1900056, 105, 107, 108, 106, 10002052, 2, 4, 15, 10002012, 3, 10002053, 3, 5, 25, 10002013, 3, 10002053, 4, 6, 25, 10002013, 3, 10003055, 5, 7, 35, 10003015, 3),
|
||||
(120037, 20034, 20005, 36, 1051, 1018, 1900056, 105, 107, 108, 106, 3010104, 10, 4, 15, 3011213, 3, 3010105, 18, 5, 5, 3011112, 3, 3010311, 12, 6, 35, 3011316, 3, 3010107, 15, 7, 30, 3011217, 3),
|
||||
(120038, 20034, 20005, 34, 1051, 1018, 1900056, 105, 107, 108, 106, 8031224, 2, 4, 10, 10005001, 3, 8031121, 3, 5, 15, 10005005, 3, 8031419, 4, 6, 30, 10005015, 3, 8032303, 5, 7, 45, 10005025, 3),
|
||||
(120039, 20034, 20005, 29, 1051, 1018, 1900056, 105, 107, 108, 106, 10008205, 2, 4, 10, 10008005, 3, 10008204, 3, 5, 15, 10008004, 3, 10008207, 4, 6, 20, 10008007, 3, 10008211, 5, 7, 30, 10008011, 3),
|
||||
(120040, 20034, 20005, 33, 1051, 1018, 1900056, 105, 107, 108, 106, 8081016, 2, 4, 10, 10007104, 3, 8081311, 3, 5, 15, 10007104, 3, 8080517, 4, 6, 35, 10007116, 3, 8080521, 5, 7, 40, 10007125, 3),
|
||||
(120041, 20034, 20005, 32, 1051, 1018, 1900056, 105, 107, 108, 106, 5020108, 2, 4, 10, 10006003, 3, 5020212, 3, 5, 30, 10006005, 3, 5020109, 4, 6, 40, 10006005, 3, 5020214, 5, 7, 45, 10006005, 3),
|
||||
(120042, 20034, 20005, 35, 1051, 1018, 1900056, 105, 107, 108, 106, 3011527, 24, 4, 10, 3011415, 8, 3011524, 36, 5, 1, 3011524, 8, 3011532, 48, 6, 10, 3011404, 8, 3011536, 60, 7, 20, 10009405, 8),
|
||||
(120043, 20034, 20005, 30, 1051, 1022, 1400076, 61, 63, 64, 62, 4040009, 2, 4, 15, 10002012, 3, 4040405, 3, 5, 25, 10002012, 3, 4020302, 4, 6, 30, 10002013, 3, 4070107, 5, 7, 45, 10002015, 3),
|
||||
(120044, 20034, 20005, 31, 1051, 1022, 1400076, 61, 63, 64, 62, 10002022, 6, 4, 15, 10002012, 3, 10002023, 9, 5, 25, 10002013, 3, 10002023, 12, 6, 25, 10002013, 3, 10003025, 5, 7, 35, 10003015, 3),
|
||||
(120045, 20034, 20005, 36, 1051, 1022, 1400076, 61, 63, 64, 62, 3010001, 10, 4, 15, 3011003, 3, 3010017, 6, 5, 50, 3011012, 3, 3010008, 8, 6, 40, 3011002, 3, 3010011, 15, 7, 35, 3011004, 3),
|
||||
(120046, 20034, 20005, 34, 1051, 1022, 1400076, 61, 63, 64, 62, 8030423, 2, 4, 20, 10005005, 3, 8031417, 3, 5, 25, 10005005, 3, 8030520, 4, 6, 45, 10005025, 3, 8032305, 5, 7, 50, 10005033, 3),
|
||||
(120047, 20034, 20005, 29, 1051, 1022, 1400076, 61, 63, 64, 62, 10008207, 2, 4, 20, 10008007, 3, 10008211, 3, 5, 30, 10008011, 3, 10008216, 4, 6, 40, 10008016, 3, 10008214, 5, 7, 45, 10008014, 3),
|
||||
(120048, 20034, 20005, 33, 1051, 1022, 1400076, 61, 63, 64, 62, 8080224, 2, 4, 20, 10007104, 3, 8080513, 3, 5, 25, 10007126, 3, 8080427, 4, 6, 45, 10007116, 3, 8080712, 5, 7, 50, 10007116, 3),
|
||||
(120049, 20034, 20005, 32, 1051, 1022, 1400076, 61, 63, 64, 62, 5020210, 2, 4, 20, 10006006, 3, 5020211, 3, 5, 25, 10006006, 3, 5020213, 4, 6, 35, 10006005, 3, 5020215, 5, 7, 50, 10006005, 3),
|
||||
(120050, 20034, 20005, 35, 1051, 1022, 1400076, 61, 63, 64, 62, 3020002, 8, 4, 20, 10009611, 2, 3020525, 9, 5, 25, 10009611, 2, 3020201, 4, 6, 50, 10009508, 2, 3020402, 15, 7, 30, 10009605, 6),
|
||||
(120051, 20034, 20005, 30, 1051, 1020, 1300073, 141, 143, 144, 142, 4040108, 2, 4, 40, 10002013, 3, 7020014, 3, 5, 40, 10003015, 3, 6040015, 4, 6, 50, 10002015, 3, 4020309, 5, 7, 50, 10002015, 3),
|
||||
(120052, 20034, 20005, 31, 1051, 1020, 1300073, 141, 143, 144, 142, 10003025, 2, 4, 35, 10003015, 3, 10003025, 3, 5, 35, 10003015, 3, 10002024, 4, 6, 45, 10002015, 3, 10002024, 5, 7, 45, 10002015, 3),
|
||||
(120053, 20034, 20005, 36, 1051, 1020, 1300073, 141, 143, 144, 142, 3010011, 6, 4, 35, 3011004, 3, 3010017, 6, 5, 50, 3011012, 3, 3010008, 8, 6, 40, 3011002, 3, 3010002, 20, 7, 25, 3011001, 3),
|
||||
(120054, 20034, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002012, 3, 3020002, 3, 5, 1, 10002012, 3, 3020002, 4, 6, 1, 10002012, 3, 3020002, 5, 7, 1, 10002012, 3),
|
||||
(120055, 20034, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002012, 3, 3020002, 3, 5, 1, 10002012, 3, 3020002, 4, 6, 1, 10002012, 3, 3020002, 5, 7, 1, 10002012, 3),
|
||||
(120056, 20034, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002012, 3, 3020002, 3, 5, 1, 10002012, 3, 3020002, 4, 6, 1, 10002012, 3, 3020002, 5, 7, 1, 10002012, 3),
|
||||
(120057, 20034, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002012, 3, 3020002, 3, 5, 1, 10002012, 3, 3020002, 4, 6, 1, 10002012, 3, 3020002, 5, 7, 1, 10002012, 3),
|
||||
(120058, 20034, 20005, 1, 1, 1, 0, 1, 2, 3, 4, 3020002, 2, 4, 1, 10002012, 3, 3020002, 3, 5, 1, 10002012, 3, 3020002, 4, 6, 1, 10002012, 3, 3020002, 5, 7, 1, 10002012, 3),
|
||||
(120059, 20034, 20005, 30, 1051, 1014, 1600125, 45, 47, 48, 46, 6020004, 2, 4, 5, 10002011, 3, 4030004, 3, 5, 10, 10002011, 3, 6030010, 4, 6, 15, 10002011, 3, 4030405, 5, 7, 35, 10002013, 3),
|
||||
(120060, 20034, 20005, 34, 1051, 1014, 1600125, 45, 47, 48, 46, 8030819, 2, 4, 5, 10005001, 3, 8030821, 3, 5, 15, 10005005, 3, 8031224, 4, 6, 10, 10005001, 3, 8030220, 5, 7, 35, 10005020, 3),
|
||||
(120061, 20034, 20005, 29, 1051, 1014, 1600125, 45, 47, 48, 46, 10008203, 2, 4, 1, 10008003, 3, 10008205, 3, 5, 10, 10008005, 3, 10008204, 4, 6, 15, 10008004, 3, 10008207, 5, 7, 20, 10008007, 3),
|
||||
(120062, 20034, 20005, 33, 1051, 1014, 1600125, 45, 47, 48, 46, 8081118, 2, 4, 5, 10007101, 3, 8081120, 3, 5, 15, 10007126, 3, 8080529, 4, 6, 25, 10007126, 3, 8080541, 5, 7, 35, 10007116, 3),
|
||||
(120063, 20034, 20005, 31, 1051, 1014, 1600125, 45, 47, 48, 46, 10002051, 2, 4, 5, 10002011, 3, 10002051, 3, 5, 5, 10002011, 3, 10002052, 4, 6, 15, 10002012, 3, 10002053, 5, 7, 25, 10002013, 3),
|
||||
(120064, 20034, 20005, 32, 1051, 1014, 1600125, 45, 47, 48, 46, 5020106, 2, 4, 5, 10006003, 3, 5020108, 3, 5, 10, 10006003, 3, 5020011, 4, 6, 35, 10003013, 3, 5020109, 5, 7, 40, 10006005, 3),
|
||||
(120065, 20034, 20005, 35, 1051, 1014, 1600125, 45, 47, 48, 46, 3011527, 24, 4, 10, 3011415, 8, 3011529, 36, 5, 1, 10009104, 2, 3011526, 48, 6, 1, 3011525, 8, 3011530, 60, 7, 1, 10009301, 6),
|
||||
(120066, 20034, 20005, 36, 1051, 1014, 1600125, 45, 47, 48, 46, 3010301, 8, 4, 20, 3011301, 3, 3010303, 6, 5, 45, 10009502, 3, 3010305, 20, 6, 10, 3011303, 3, 3010308, 10, 7, 45, 3011310, 12),
|
||||
(120067, 20034, 20005, 30, 1051, 1026, 2200258, 161, 163, 164, 162, 4030116, 2, 4, 40, 10003015, 3, 4020209, 3, 5, 45, 10002015, 3, 4040305, 4, 6, 45, 10002015, 3, 4030406, 5, 7, 50, 10002015, 3),
|
||||
(120068, 20034, 20005, 31, 1051, 1026, 2200258, 161, 163, 164, 162, 10003055, 2, 4, 35, 10003015, 3, 10003055, 3, 5, 35, 10003015, 3, 10002054, 4, 6, 40, 10002015, 3, 10002054, 5, 7, 40, 10002015, 3),
|
||||
(120069, 20034, 20005, 36, 1051, 1026, 2200258, 161, 163, 164, 162, 3010110, 4, 4, 45, 3011121, 3, 3010109, 6, 5, 40, 3011016, 3, 3010113, 16, 6, 25, 3011207, 3, 3010111, 10, 7, 50, 3011123, 3),
|
||||
(120201, 20033, 20005, 30, 2001, 2017, 1300085, 365, 366, 367, 368, 10002011, 2, 4, 1, 6020004, 1, 10002011, 3, 5, 1, 8032501, 1, 10002011, 4, 6, 1, 8070320, 1, 10002011, 5, 7, 1, 8080615, 1),
|
||||
(120202, 20033, 20005, 34, 2001, 2017, 1300085, 365, 366, 367, 368, 8030420, 2, 4, 1, 6060008, 1, 8030420, 3, 5, 1, 8032501, 1, 8030420, 4, 6, 1, 8070320, 1, 8030420, 5, 7, 1, 8080615, 1),
|
||||
(120203, 20033, 20005, 29, 2001, 2017, 1300085, 365, 366, 367, 368, 10008203, 2, 4, 1, 6010009, 1, 10008203, 3, 5, 1, 8032501, 1, 10008203, 4, 6, 1, 8070320, 1, 10008203, 5, 7, 1, 8080615, 1),
|
||||
(120204, 20033, 20005, 33, 2001, 2017, 1300085, 365, 366, 367, 368, 8080220, 2, 4, 1, 6050009, 1, 8080220, 3, 5, 1, 8032501, 1, 8080220, 4, 6, 1, 8070320, 1, 8080220, 5, 7, 1, 8080615, 1),
|
||||
(120205, 20033, 20005, 31, 2001, 2017, 1300085, 365, 366, 367, 368, 10002071, 6, 4, 1, 6030009, 1, 10002071, 9, 5, 1, 8032501, 1, 10002071, 12, 6, 1, 8070320, 1, 10002071, 15, 7, 1, 8080615, 1),
|
||||
(120206, 20033, 20005, 32, 2001, 2017, 1300085, 365, 366, 367, 368, 9050052, 2, 4, 1, 6040009, 1, 9050052, 3, 5, 1, 8032501, 1, 9050052, 4, 6, 1, 8070320, 1, 9050052, 5, 7, 1, 8080615, 1),
|
||||
(120207, 20033, 20005, 35, 2001, 2017, 1300085, 365, 366, 367, 368, 3011530, 24, 4, 1, 6070009, 1, 3011530, 36, 5, 1, 8032501, 1, 3011530, 48, 6, 1, 8070320, 1, 3011530, 60, 7, 1, 8080615, 1),
|
||||
(120208, 20033, 20005, 36, 2001, 2017, 1300085, 365, 366, 367, 368, 3010202, 12, 4, 1, 6080009, 1, 3010202, 18, 5, 1, 8032501, 1, 3010202, 24, 6, 1, 8070320, 1, 3010202, 30, 7, 1, 8080615, 1),
|
||||
(120209, 20033, 20005, 30, 2001, 2001, 1100374, 337, 338, 339, 340, 6021003, 2, 4, 10, 10002011, 3, 6021004, 3, 5, 20, 10002012, 3, 6021005, 4, 6, 35, 10002013, 3, 6021007, 5, 7, 45, 10003015, 3),
|
||||
(120210, 20033, 20005, 34, 2001, 2001, 1100374, 337, 338, 339, 340, 8030621, 2, 4, 45, 10005025, 3, 8030621, 3, 5, 45, 10005025, 3, 8030623, 4, 6, 50, 10005033, 3, 8030623, 5, 7, 50, 10005033, 3),
|
||||
(120211, 20033, 20005, 29, 2001, 2001, 1100374, 337, 338, 339, 340, 4100604, 2, 4, 5, 10008203, 3, 4100605, 3, 5, 15, 10008205, 3, 4100110, 4, 6, 25, 10008207, 3, 4100111, 5, 7, 45, 10008216, 3),
|
||||
(120212, 20033, 20005, 29, 2001, 2001, 1100374, 337, 338, 339, 340, 5030107, 2, 4, 15, 10008004, 3, 5030207, 3, 5, 25, 10008008, 3, 5030208, 4, 6, 35, 10008008, 3, 5030109, 5, 7, 40, 10008011, 3),
|
||||
(120213, 20033, 20004, 29, 2001, 2001, 1100374, 337, 338, 339, 340, 4070204, 2, 4, 5, 10008203, 3, 4070208, 3, 5, 20, 10008205, 3, 4070212, 4, 6, 35, 10008211, 3, 4070213, 5, 7, 50, 10008214, 3),
|
||||
(120214, 20033, 20005, 33, 2001, 2001, 1100374, 337, 338, 339, 340, 9010054, 2, 4, 5, 10007101, 3, 9010055, 3, 5, 15, 10007104, 3, 9010056, 4, 6, 25, 10007126, 3, 9010057, 5, 7, 40, 10007116, 3),
|
||||
(120215, 20033, 20005, 33, 2001, 2001, 1100374, 337, 338, 339, 340, 10007104, 2, 4, 10, 10007003, 3, 10007126, 3, 5, 15, 10007016, 3, 10007116, 4, 6, 30, 10007018, 3, 10007127, 5, 7, 45, 10007020, 3),
|
||||
(120216, 20033, 20004, 33, 2001, 2001, 1100374, 337, 338, 339, 340, 9040057, 2, 4, 15, 10007104, 3, 9040058, 3, 5, 25, 10007126, 3, 9040059, 4, 6, 35, 10007116, 3, 9040060, 5, 7, 45, 10007127, 3),
|
||||
(120217, 20033, 20005, 31, 2001, 2001, 1100374, 337, 338, 339, 340, 8080819, 2, 4, 20, 10002012, 3, 8080821, 3, 5, 30, 10002023, 2, 8080823, 4, 6, 45, 10003025, 2, 8080825, 5, 7, 50, 10002024, 2),
|
||||
(120218, 20033, 20005, 32, 2001, 2001, 1100374, 337, 338, 339, 340, 9010027, 2, 4, 15, 10003012, 3, 9010052, 3, 5, 30, 10006005, 3, 9010038, 4, 6, 40, 10003015, 3, 9010037, 5, 7, 40, 10003015, 3),
|
||||
(120219, 20033, 20005, 35, 2001, 2001, 1100374, 337, 338, 339, 340, 3020102, 8, 4, 35, 10009507, 4, 3020102, 12, 5, 35, 10009507, 4, 3020519, 12, 6, 35, 10006010, 12, 3020519, 15, 7, 35, 10006010, 12),
|
||||
(120220, 20033, 20005, 36, 2001, 2001, 1500110, 341, 342, 343, 344, 3010208, 6, 4, 35, 3011530, 12, 3010203, 15, 5, 20, 3010603, 12, 3010207, 16, 6, 25, 3011527, 3, 3010211, 10, 7, 50, 3011016, 3),
|
||||
(120221, 20034, 20005, 30, 2001, 2017, 1100050, 181, 183, 184, 182, 7010004, 2, 4, 5, 10002011, 3, 6050012, 3, 5, 30, 10002012, 3, 7010010, 4, 6, 25, 10002012, 3, 6050014, 5, 7, 40, 10003015, 3),
|
||||
(120222, 20034, 20005, 34, 2001, 2017, 1100050, 181, 183, 184, 182, 8070320, 2, 4, 1, 10005001, 3, 8070416, 3, 5, 5, 10005001, 3, 8070322, 4, 6, 15, 10005005, 3, 8070418, 5, 7, 20, 10005005, 3),
|
||||
(120223, 20034, 20005, 29, 2001, 2017, 1100050, 181, 183, 184, 182, 4070006, 2, 4, 5, 10008203, 3, 4070009, 3, 5, 10, 10008203, 3, 4070011, 4, 6, 20, 10008204, 3, 4070104, 5, 7, 35, 10008205, 3),
|
||||
(120224, 20034, 20005, 33, 2001, 2017, 1100050, 181, 183, 184, 182, 8070911, 2, 4, 20, 10007126, 3, 8070913, 3, 5, 30, 10007113, 3, 8070720, 4, 6, 45, 10007116, 3, 8070722, 5, 7, 50, 10007116, 3),
|
||||
(120225, 20034, 20005, 31, 2001, 2017, 1100050, 181, 183, 184, 182, 4100709, 2, 4, 5, 10002021, 2, 8070606, 3, 5, 10, 10002021, 2, 5020306, 4, 6, 15, 10002011, 3, 8090105, 5, 7, 40, 10002023, 2),
|
||||
(120226, 20034, 20005, 32, 2001, 2017, 1100050, 181, 183, 184, 182, 4020005, 2, 4, 5, 10006001, 3, 4020005, 3, 5, 5, 10006001, 3, 4020005, 4, 6, 5, 10006001, 3, 4020207, 5, 7, 15, 10003012, 3),
|
||||
(120227, 20034, 20005, 35, 2001, 2017, 1100050, 181, 183, 184, 182, 10009208, 2, 4, 30, 10009502, 2, 10009206, 3, 5, 5, 3011407, 2, 10009207, 4, 6, 15, 3011011, 2, 10009207, 10, 7, 30, 3011117, 2),
|
||||
(120228, 20034, 20005, 36, 2001, 2017, 1100050, 181, 183, 184, 182, 3010102, 12, 4, 1, 3011205, 3, 3010104, 15, 5, 15, 3011213, 3, 3010107, 12, 6, 30, 3011217, 3, 3010110, 10, 7, 45, 3011121, 3),
|
||||
(120229, 20034, 20005, 29, 2001, 2021, 1600205, 185, 187, 188, 186, 5030029, 2, 4, 35, 10008109, 3, 5030031, 3, 5, 45, 10008112, 3, 5030209, 4, 6, 45, 10008016, 3, 5030035, 5, 7, 50, 10008115, 3),
|
||||
(120230, 20034, 20005, 33, 2001, 2021, 1600205, 185, 187, 188, 186, 8031033, 2, 4, 45, 10007116, 3, 8031036, 3, 5, 45, 10007116, 3, 8031039, 4, 6, 45, 10007116, 3, 8031026, 5, 7, 50, 10007127, 3),
|
||||
(120231, 20034, 20005, 30, 2001, 2021, 1600205, 185, 187, 188, 186, 6020012, 2, 4, 40, 10002013, 3, 6010014, 3, 5, 40, 10003015, 3, 7010013, 4, 6, 50, 10002015, 3, 6010015, 5, 7, 50, 10002015, 3),
|
||||
(120232, 20034, 20005, 34, 2001, 2021, 1600205, 185, 187, 188, 186, 8070324, 2, 4, 45, 10005025, 3, 8070420, 3, 5, 45, 10005025, 3, 8070328, 4, 6, 50, 10005033, 3, 8070424, 5, 7, 50, 10005033, 3),
|
||||
(120233, 20034, 20005, 31, 2001, 2033, 1200093, 197, 199, 200, 198, 8031609, 2, 4, 20, 10002022, 2, 8030320, 3, 5, 35, 10002053, 3, 8030109, 4, 6, 40, 10002023, 2, 8031610, 5, 7, 45, 10002013, 3),
|
||||
(120234, 20034, 20005, 32, 2001, 2021, 1600205, 185, 187, 188, 186, 4020006, 2, 4, 35, 10006106, 3, 4020006, 3, 5, 35, 10006106, 3, 4020008, 4, 6, 45, 10006115, 3, 4020008, 5, 7, 45, 10006115, 3),
|
||||
(120235, 20034, 20005, 35, 2001, 2033, 1200093, 197, 199, 200, 198, 10009208, 2, 4, 30, 10009502, 2, 10009207, 6, 5, 30, 3011117, 2, 10009207, 8, 6, 30, 3011117, 2, 10009208, 5, 7, 30, 10009502, 2),
|
||||
(120236, 20034, 20005, 36, 2001, 2021, 1600205, 185, 187, 188, 186, 3010507, 4, 4, 40, 3011304, 6, 3010113, 12, 5, 25, 3011207, 3, 3010508, 8, 6, 45, 3011227, 3, 3010110, 10, 7, 45, 3011121, 3),
|
||||
(120237, 20034, 20005, 29, 2001, 2025, 1400069, 189, 191, 192, 190, 4030706, 2, 4, 10, 10008205, 3, 4030707, 3, 5, 30, 10008204, 3, 4030708, 4, 6, 35, 10008207, 3, 4030709, 5, 7, 45, 10008211, 3),
|
||||
(120238, 20034, 20005, 33, 2001, 2025, 1400069, 189, 191, 192, 190, 8031514, 2, 4, 10, 10007104, 3, 8031514, 3, 5, 10, 10007104, 3, 8031516, 4, 6, 40, 10007116, 3, 8031518, 5, 7, 45, 10007125, 3),
|
||||
(120239, 20034, 20005, 30, 2001, 2025, 1400069, 189, 191, 192, 190, 4040103, 2, 4, 10, 10002011, 3, 4040304, 3, 5, 30, 10002013, 3, 4020307, 4, 6, 40, 10003015, 3, 4040207, 5, 7, 50, 10002015, 3),
|
||||
(120240, 20034, 20005, 34, 2001, 2025, 1400069, 189, 191, 192, 190, 8070322, 2, 4, 15, 10005005, 3, 8070418, 3, 5, 20, 10005005, 3, 8071116, 4, 6, 30, 10005015, 3, 8071119, 5, 7, 40, 10005020, 3),
|
||||
(120241, 20034, 20005, 31, 2001, 2025, 1400069, 189, 191, 192, 190, 8011106, 2, 4, 10, 10002021, 2, 8011404, 3, 5, 20, 10002022, 2, 8010005, 4, 6, 40, 10002023, 2, 8011406, 5, 7, 45, 10003025, 2),
|
||||
(120242, 20034, 20005, 32, 2001, 2025, 1400069, 189, 191, 192, 190, 4020207, 2, 4, 15, 10003012, 3, 4020207, 3, 5, 15, 10003012, 3, 4020006, 4, 6, 35, 10006106, 3, 4020008, 5, 7, 45, 10006115, 3),
|
||||
(120243, 20034, 20005, 35, 2001, 2025, 1400069, 189, 191, 192, 190, 3020002, 8, 4, 20, 10009611, 2, 3020522, 9, 5, 25, 10009210, 4, 3020201, 4, 6, 50, 10009508, 2, 3020515, 20, 7, 15, 10006104, 2),
|
||||
(120244, 20034, 20005, 36, 2001, 2025, 1400069, 189, 191, 192, 190, 3010104, 10, 4, 15, 3011213, 3, 3010115, 12, 5, 25, 3011209, 3, 3010109, 8, 6, 40, 3011016, 3, 3010110, 10, 7, 45, 3011121, 3),
|
||||
(120245, 20034, 20005, 29, 2001, 2029, 1900111, 193, 195, 196, 194, 5030030, 2, 4, 45, 10008112, 3, 5030032, 3, 5, 45, 10008112, 3, 5030033, 4, 6, 50, 10008115, 3, 5030034, 5, 7, 50, 10008115, 3),
|
||||
(120246, 20034, 20005, 33, 2001, 2029, 1900111, 193, 195, 196, 194, 8031022, 2, 4, 45, 10007116, 3, 8031046, 3, 5, 50, 10007127, 3, 8031050, 4, 6, 50, 10007127, 3, 8031054, 5, 7, 50, 10007127, 3),
|
||||
(120247, 20034, 20005, 29, 2001, 2033, 1200093, 197, 199, 200, 198, 4080406, 2, 4, 25, 10008205, 3, 4070306, 3, 5, 30, 10008205, 3, 4070307, 4, 6, 40, 10008211, 3, 4080407, 5, 7, 50, 10008214, 3),
|
||||
(120248, 20034, 20005, 33, 2001, 2033, 1200093, 197, 199, 200, 198, 8031516, 2, 4, 40, 10007116, 3, 8031518, 3, 5, 45, 10007125, 3, 8031520, 4, 6, 50, 10007116, 3, 8031520, 5, 7, 50, 10007116, 3),
|
||||
(120401, 20033, 20005, 30, 3051, 3011, 1200106, 369, 370, 371, 372, 4030110, 2, 4, 1, 6020004, 1, 4030110, 3, 5, 1, 8032501, 1, 4030110, 4, 6, 1, 8070320, 1, 4030110, 5, 7, 1, 8080615, 1),
|
||||
(120402, 20033, 20005, 34, 3051, 3011, 1200106, 369, 370, 371, 372, 8050220, 2, 4, 1, 6060008, 1, 8050220, 3, 5, 1, 8032501, 1, 8050220, 4, 6, 1, 8070320, 1, 8050220, 5, 7, 1, 8080615, 1),
|
||||
(120403, 20033, 20005, 29, 3051, 3011, 1200106, 369, 370, 371, 372, 10008203, 2, 4, 1, 6010009, 1, 10008203, 3, 5, 1, 8032501, 1, 10008203, 4, 6, 1, 8070320, 1, 10008203, 5, 7, 1, 8080615, 1),
|
||||
(120404, 20033, 20005, 33, 3051, 3011, 1200106, 369, 370, 371, 372, 8080615, 2, 4, 1, 6050009, 1, 8080615, 3, 5, 1, 8032501, 1, 8080615, 4, 6, 1, 8070320, 1, 8080615, 5, 7, 1, 8080615, 1),
|
||||
(120405, 20033, 20005, 31, 3051, 3011, 1200106, 369, 370, 371, 372, 10002071, 6, 4, 1, 6030009, 1, 10002071, 9, 5, 1, 8032501, 1, 10002071, 12, 6, 1, 8070320, 1, 10002071, 15, 7, 1, 8080615, 1),
|
||||
(120406, 20033, 20005, 32, 3051, 3011, 1200106, 369, 370, 371, 372, 9050052, 2, 4, 1, 6040009, 1, 9050052, 3, 5, 1, 8032501, 1, 9050052, 4, 6, 1, 8070320, 1, 9050052, 5, 7, 1, 8080615, 1),
|
||||
(120407, 20033, 20005, 35, 3051, 3011, 1200106, 369, 370, 371, 372, 3011529, 24, 4, 1, 6070009, 1, 3011529, 36, 5, 1, 8032501, 1, 3011529, 48, 6, 1, 8070320, 1, 3011529, 60, 7, 1, 8080615, 1),
|
||||
(120408, 20033, 20005, 36, 3051, 3011, 1200106, 369, 370, 371, 372, 3010201, 12, 4, 1, 6080009, 1, 3010201, 18, 5, 1, 8032501, 1, 3010201, 24, 6, 1, 8070320, 1, 3010201, 30, 7, 1, 8080615, 1),
|
||||
(120409, 20033, 20005, 30, 3051, 3509, 1600214, 357, 358, 359, 360, 4030203, 2, 4, 20, 10002012, 3, 4030008, 3, 5, 25, 10002012, 3, 4030304, 4, 6, 30, 10002013, 3, 4030204, 5, 7, 45, 10002015, 3),
|
||||
(120410, 20033, 20005, 34, 3051, 3509, 1600214, 357, 358, 359, 360, 8050609, 2, 4, 5, 10005001, 3, 8050611, 3, 5, 25, 10005005, 3, 8050613, 4, 6, 45, 10005025, 3, 8050615, 5, 7, 50, 10005033, 3),
|
||||
(120411, 20033, 20005, 34, 3051, 3509, 1600214, 357, 358, 359, 360, 8050712, 2, 4, 25, 10005015, 3, 8050716, 3, 5, 35, 10005020, 3, 8050741, 4, 6, 35, 10005020, 3, 8050720, 5, 7, 40, 10005025, 3),
|
||||
(120412, 20033, 20004, 34, 3051, 3509, 1600214, 357, 358, 359, 360, 8050120, 2, 4, 35, 10005015, 3, 8050125, 3, 5, 40, 10005020, 3, 8050122, 4, 6, 45, 10005025, 3, 8050130, 5, 7, 50, 10005033, 3),
|
||||
(120413, 20033, 20005, 29, 3051, 3509, 1300033, 353, 354, 355, 356, 8081404, 2, 4, 1, 10008203, 3, 8080320, 3, 5, 45, 10008211, 3, 8080320, 4, 6, 45, 10008211, 3, 8080324, 5, 7, 50, 10008216, 3),
|
||||
(120414, 20033, 20005, 33, 3051, 3509, 1600214, 357, 358, 359, 360, 8050503, 2, 4, 10, 10007104, 3, 8050509, 3, 5, 40, 10007116, 3, 8050511, 4, 6, 45, 10007125, 3, 8050513, 5, 7, 50, 10007127, 3),
|
||||
(120415, 20033, 20005, 31, 3051, 3509, 1600214, 357, 358, 359, 360, 4100709, 2, 4, 5, 10002021, 2, 4100307, 3, 5, 25, 10002022, 2, 4100711, 4, 6, 30, 10002023, 2, 4100204, 5, 7, 50, 10002024, 2),
|
||||
(120416, 20033, 20005, 32, 3051, 3509, 1000213, 349, 350, 351, 352, 5020007, 2, 4, 5, 10003011, 3, 5020008, 3, 5, 15, 10003012, 3, 5020010, 4, 6, 30, 10003013, 3, 5020012, 5, 7, 45, 10003014, 3),
|
||||
(120417, 20033, 20005, 32, 3051, 3509, 1000213, 349, 350, 351, 352, 9030022, 2, 4, 15, 10003012, 3, 9030048, 3, 5, 35, 10003015, 3, 9030038, 4, 6, 40, 10003015, 3, 9030041, 5, 7, 50, 10003014, 3),
|
||||
(120418, 20033, 20004, 32, 3051, 3509, 1000213, 349, 350, 351, 352, 9040028, 2, 4, 20, 10003012, 3, 9040035, 3, 5, 30, 10003013, 3, 9040034, 4, 6, 30, 10003013, 3, 9040042, 5, 7, 40, 10003015, 3),
|
||||
(120419, 20033, 20005, 35, 3051, 3509, 1300033, 353, 354, 355, 356, 10009313, 2, 4, 15, 10007001, 2, 10009302, 36, 5, 5, 10009301, 6, 10009307, 4, 6, 10, 10009306, 4, 10009201, 10, 7, 5, 10009108, 4),
|
||||
(120420, 20033, 20005, 35, 3051, 3509, 1300033, 353, 354, 355, 356, 10009207, 4, 4, 30, 3011117, 2, 10009208, 3, 5, 30, 10009502, 2, 10009207, 8, 6, 30, 3011117, 2, 10009208, 5, 7, 30, 10009502, 2),
|
||||
(120421, 20033, 20004, 35, 3051, 3509, 1300033, 353, 354, 355, 356, 3020308, 2, 4, 45, 3011133, 6, 3020303, 6, 5, 45, 10009406, 6, 3020304, 8, 6, 45, 10009606, 6, 3020307, 10, 7, 40, 3011212, 12),
|
||||
(120422, 20033, 20005, 36, 3051, 3509, 1000213, 349, 350, 351, 352, 3010412, 10, 4, 10, 3011542, 3, 3010211, 6, 5, 50, 3011016, 3, 3010001, 20, 6, 15, 3011003, 3, 3010012, 10, 7, 45, 3011016, 3),
|
||||
(120423, 20034, 20005, 30, 3051, 3011, 1500060, 201, 203, 204, 202, 7020009, 2, 4, 5, 10002011, 3, 6081005, 3, 5, 20, 10002012, 3, 6071006, 4, 6, 30, 10002013, 3, 6081007, 5, 7, 45, 10003015, 3),
|
||||
(120424, 20034, 20005, 34, 3051, 3011, 1500060, 201, 203, 204, 202, 10005302, 2, 4, 15, 10005203, 12, 10005307, 3, 5, 25, 10005306, 12, 10005303, 4, 6, 30, 10005204, 12, 10005304, 5, 7, 40, 10005503, 12),
|
||||
(120425, 20034, 20005, 29, 3051, 3011, 1500060, 201, 203, 204, 202, 4080205, 2, 4, 5, 10008203, 3, 4080206, 3, 5, 15, 10008204, 3, 4080208, 4, 6, 25, 10008207, 3, 4080209, 5, 7, 30, 10008207, 3),
|
||||
(120426, 20034, 20005, 33, 3051, 3011, 1500060, 201, 203, 204, 202, 8071013, 2, 4, 1, 10007101, 3, 4020107, 3, 5, 5, 10007101, 3, 8030920, 4, 6, 20, 10007126, 3, 9010057, 5, 7, 40, 10007116, 3),
|
||||
(120427, 20034, 20005, 31, 3051, 3011, 1500060, 201, 203, 204, 202, 6070009, 2, 4, 5, 10002021, 2, 4100504, 3, 5, 15, 10002021, 2, 6070012, 4, 6, 30, 10002013, 3, 6080014, 5, 7, 40, 10002023, 2),
|
||||
(120428, 20034, 20005, 32, 3051, 3011, 1500060, 201, 203, 204, 202, 10004102, 2, 4, 15, 10004002, 3, 10004106, 3, 5, 15, 10004006, 3, 10004109, 4, 6, 25, 10004009, 3, 10004113, 5, 7, 40, 10004013, 3),
|
||||
(120429, 20034, 20005, 35, 3051, 3011, 1500060, 201, 203, 204, 202, 3020002, 8, 4, 20, 10009611, 2, 3020525, 9, 5, 25, 10009611, 2, 3020528, 12, 6, 25, 10009507, 4, 3020522, 15, 7, 25, 10009210, 4),
|
||||
(120430, 20034, 20005, 36, 3051, 3011, 1500060, 201, 203, 204, 202, 3010102, 12, 4, 1, 3011205, 3, 3010019, 6, 5, 40, 3011458, 3, 3010403, 16, 6, 20, 3011453, 3, 3010402, 20, 7, 20, 3011502, 12),
|
||||
(120431, 20034, 20005, 35, 3051, 3014, 1100072, 205, 207, 208, 206, 3011536, 24, 4, 20, 10009405, 8, 3011536, 36, 5, 20, 10009405, 8, 3011536, 48, 6, 20, 10009405, 8, 3011536, 60, 7, 20, 10009405, 8),
|
||||
(120432, 20034, 20005, 32, 3051, 3014, 1100072, 205, 207, 208, 206, 9050027, 2, 4, 5, 10003011, 3, 9050028, 3, 5, 15, 10003012, 3, 9050029, 4, 6, 25, 10003013, 3, 9050030, 5, 7, 40, 10003015, 3),
|
||||
(120433, 20034, 20005, 34, 3051, 3014, 1100072, 205, 207, 208, 206, 10005005, 2, 4, 15, 10005302, 6, 10005015, 3, 5, 25, 10005307, 6, 10005020, 4, 6, 30, 10005303, 6, 10005025, 5, 7, 40, 10005304, 6),
|
||||
(120434, 20034, 20005, 30, 3051, 3014, 1100072, 205, 207, 208, 206, 4020206, 2, 4, 10, 10002011, 3, 7010104, 3, 5, 20, 10002012, 3, 4020208, 4, 6, 25, 10002012, 3, 7010107, 5, 7, 45, 10003015, 3),
|
||||
(120435, 20034, 20005, 29, 3051, 3014, 1100072, 205, 207, 208, 206, 4080008, 2, 4, 10, 10008203, 3, 4080304, 3, 5, 30, 10008207, 3, 4080009, 4, 6, 40, 10008207, 3, 4080305, 5, 7, 45, 10008211, 3),
|
||||
(120436, 20034, 20005, 33, 3051, 3014, 1100072, 205, 207, 208, 206, 4070205, 2, 4, 10, 10007104, 3, 4070210, 3, 5, 25, 10007126, 3, 8030922, 4, 6, 30, 10007113, 3, 8070520, 5, 7, 40, 10007125, 3),
|
||||
(120437, 20034, 20005, 31, 3051, 3014, 1100072, 205, 207, 208, 206, 8070606, 2, 4, 10, 10002021, 2, 8070218, 3, 5, 20, 10002022, 2, 8070109, 4, 6, 40, 10002023, 2, 8070610, 5, 7, 50, 10002024, 2),
|
||||
(120438, 20034, 20005, 36, 3051, 3014, 1100072, 205, 207, 208, 206, 3010019, 4, 4, 40, 3011458, 3, 3010306, 9, 5, 35, 3011512, 3, 3010206, 16, 6, 20, 3011524, 12, 3010208, 15, 7, 35, 3011530, 12),
|
||||
(120439, 20034, 20005, 35, 3051, 3018, 1600028, 209, 211, 212, 210, 3020409, 4, 4, 50, 10009508, 2, 3020003, 6, 5, 40, 10009402, 2, 3020404, 8, 6, 40, 10009606, 6, 3020403, 20, 7, 15, 10009406, 6),
|
||||
(120440, 20034, 20005, 32, 3051, 3018, 1600028, 209, 211, 212, 210, 8010419, 2, 4, 15, 10003012, 3, 8010423, 3, 5, 15, 10003012, 3, 8010440, 4, 6, 30, 10003013, 3, 8010442, 5, 7, 30, 10003013, 3),
|
||||
(120441, 20034, 20005, 34, 3051, 3018, 1600028, 209, 211, 212, 210, 8030717, 2, 4, 25, 10005015, 3, 8030728, 3, 5, 25, 10005015, 3, 8030730, 4, 6, 25, 10005015, 3, 8030720, 5, 7, 35, 10005020, 3),
|
||||
(120442, 20034, 20005, 30, 3051, 3018, 1600028, 209, 211, 212, 210, 6051005, 2, 4, 20, 10002012, 3, 6031006, 3, 5, 35, 10002013, 3, 6051007, 4, 6, 45, 10003015, 3, 6030015, 5, 7, 50, 10002015, 3),
|
||||
(120443, 20034, 20005, 29, 3051, 3018, 1600028, 209, 211, 212, 210, 4080104, 2, 4, 20, 10008203, 3, 4080105, 3, 5, 35, 10008207, 3, 4080106, 4, 6, 40, 10008211, 3, 4080210, 5, 7, 50, 10008216, 3),
|
||||
(120444, 20034, 20005, 33, 3051, 3018, 1600028, 209, 211, 212, 210, 4020108, 2, 4, 20, 10007104, 3, 4100007, 3, 5, 30, 10007126, 3, 8071204, 4, 6, 35, 10007116, 3, 8050809, 5, 7, 45, 10007116, 3),
|
||||
(120445, 20034, 20005, 31, 3051, 3018, 1600028, 209, 211, 212, 210, 6080011, 2, 4, 25, 10002022, 2, 8090804, 3, 5, 35, 10002023, 2, 8080109, 4, 6, 40, 10002023, 2, 8070224, 5, 7, 50, 10002024, 2),
|
||||
(120446, 20034, 20005, 36, 3051, 3018, 1600028, 209, 211, 212, 210, 3010402, 8, 4, 20, 3011502, 12, 3010008, 6, 5, 40, 3011002, 3, 3010011, 12, 6, 35, 3011004, 3, 3010208, 15, 7, 35, 3011530, 12),
|
||||
(120447, 20034, 20005, 35, 3051, 3022, 2200114, 213, 215, 216, 214, 3020526, 4, 4, 40, 10007024, 2, 3020517, 6, 5, 45, 10006015, 2, 3020103, 8, 6, 50, 10009508, 2, 3020514, 10, 7, 50, 10006005, 2),
|
||||
(120448, 20034, 20005, 32, 3051, 3022, 2200114, 213, 215, 216, 214, 9050054, 2, 4, 45, 10006110, 3, 9050031, 3, 5, 50, 10003014, 3, 9050046, 4, 6, 50, 10003014, 3, 9050051, 5, 7, 50, 10003014, 3),
|
||||
(120449, 20034, 20005, 34, 3051, 3022, 2200114, 213, 215, 216, 214, 10005025, 2, 4, 40, 10005304, 6, 10005025, 3, 5, 40, 10005304, 6, 10005033, 4, 6, 40, 10005504, 12, 10005033, 5, 7, 40, 10005504, 12),
|
||||
(120450, 20034, 20005, 35, 3051, 3026, 1300070, 217, 219, 220, 218, 3020405, 6, 4, 30, 10009401, 6, 3020201, 3, 5, 50, 10009508, 2, 3020407, 8, 6, 35, 3011212, 8, 3020408, 10, 7, 45, 3011133, 6),
|
||||
(120451, 20034, 20005, 32, 3051, 3026, 1300070, 217, 219, 220, 218, 8010446, 2, 4, 40, 10003015, 3, 8010447, 3, 5, 40, 10003015, 3, 8010449, 4, 6, 50, 10003014, 3, 8010454, 5, 7, 50, 10003014, 3),
|
||||
(120452, 20034, 20005, 34, 3051, 3026, 1300070, 217, 219, 220, 218, 8030734, 2, 4, 35, 10005020, 3, 8030736, 3, 5, 35, 10005020, 3, 8030723, 4, 6, 40, 10005025, 3, 8030741, 5, 7, 40, 10005025, 3);
|
||||
/*!40000 ALTER TABLE `gamedata_passivegl_craft` ENABLE KEYS */;
|
||||
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
File diff suppressed because it is too large
Load Diff
@ -363,7 +363,7 @@ namespace Meteor.Map.Actors
|
||||
return packets;
|
||||
}
|
||||
|
||||
public override bool Equals(Object obj)
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
Actor actorObj = obj as Actor;
|
||||
if (actorObj == null)
|
||||
@ -508,7 +508,7 @@ namespace Meteor.Map.Actors
|
||||
.Replace("Object", "Obj")
|
||||
.Replace("Retainer", "Rtn")
|
||||
.Replace("Standard", "Std");
|
||||
className = Char.ToLowerInvariant(className[0]) + className.Substring(1);
|
||||
className = char.ToLowerInvariant(className[0]) + className.Substring(1);
|
||||
|
||||
//Format Zone Name
|
||||
string zoneName = zone.zoneName.Replace("Field", "Fld")
|
||||
@ -524,7 +524,7 @@ namespace Meteor.Map.Actors
|
||||
//Check if "normal"
|
||||
zoneName = zoneName.Remove(zoneName.Length - 1, 1) + "P";
|
||||
}
|
||||
zoneName = Char.ToLowerInvariant(zoneName[0]) + zoneName.Substring(1);
|
||||
zoneName = char.ToLowerInvariant(zoneName[0]) + zoneName.Substring(1);
|
||||
|
||||
try
|
||||
{
|
||||
@ -542,7 +542,7 @@ namespace Meteor.Map.Actors
|
||||
if (zone is PrivateArea)
|
||||
privLevel = ((PrivateArea)zone).GetPrivateAreaType();
|
||||
|
||||
actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
|
||||
actorName = string.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
|
||||
}
|
||||
|
||||
public bool SetWorkValue(Player player, string name, string uiFunc, object value)
|
||||
@ -553,8 +553,8 @@ namespace Meteor.Map.Actors
|
||||
if (!(split[0].Equals("work") || split[0].Equals("charaWork") || split[0].Equals("playerWork") || split[0].Equals("npcWork")))
|
||||
return false;
|
||||
|
||||
Object parentObj = null;
|
||||
Object curObj = this;
|
||||
object parentObj = null;
|
||||
object curObj = this;
|
||||
for (int i = 0; i < split.Length; i++)
|
||||
{
|
||||
//For arrays
|
||||
@ -759,7 +759,7 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
if (target == null)
|
||||
{
|
||||
Program.Log.Error(String.Format("[{0} {1}] FindRandomPointAroundTarget: no target found!", this.actorId, this.customDisplayName));
|
||||
Program.Log.Error(string.Format("[{0} {1}] FindRandomPointAroundTarget: no target found!", this.actorId, this.customDisplayName));
|
||||
return GetPosAsVector3();
|
||||
}
|
||||
return FindRandomPoint(target.positionX, target.positionY, target.positionZ, minRadius, maxRadius);
|
||||
|
@ -48,7 +48,7 @@ namespace Meteor.Map.Actors
|
||||
protected int halfWidth, halfHeight;
|
||||
|
||||
private Dictionary<uint, Director> currentDirectors = new Dictionary<uint, Director>();
|
||||
private Object directorLock = new Object();
|
||||
private object directorLock = new object();
|
||||
private uint directorIdCount = 0;
|
||||
|
||||
protected Director mWeatherDirector;
|
||||
@ -77,7 +77,7 @@ namespace Meteor.Map.Actors
|
||||
|
||||
this.displayNameId = 0;
|
||||
this.customDisplayName = "_areaMaster";
|
||||
this.actorName = String.Format("_areaMaster@{0:X5}", id << 8);
|
||||
this.actorName = string.Format("_areaMaster@{0:X5}", id << 8);
|
||||
|
||||
this.classPath = classPath;
|
||||
this.className = classPath.Substring(classPath.LastIndexOf("/") + 1);
|
||||
@ -611,7 +611,7 @@ namespace Meteor.Map.Actors
|
||||
|
||||
public Director CreateGuildleveDirector(uint glid, byte difficulty, Player owner, params object[] args)
|
||||
{
|
||||
String directorScriptPath = "";
|
||||
string directorScriptPath = "";
|
||||
|
||||
uint type = Server.GetGuildleveGamedata(glid).plateId;
|
||||
|
||||
@ -677,6 +677,11 @@ namespace Meteor.Map.Actors
|
||||
return null;
|
||||
}
|
||||
|
||||
public ushort GetCurrentMusic()
|
||||
{
|
||||
return bgmDay;
|
||||
}
|
||||
|
||||
public override void Update(DateTime tick)
|
||||
{
|
||||
lock (mActorList)
|
||||
@ -691,6 +696,5 @@ namespace Meteor.Map.Actors
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ namespace Meteor.Map.actors.area
|
||||
private Director currentDirector;
|
||||
private bool isContentFinished = false;
|
||||
|
||||
public static PrivateAreaContent CreateContentArea(String scriptPath)
|
||||
public static PrivateAreaContent CreateContentArea(string scriptPath)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -33,14 +33,14 @@ namespace Meteor.Map.actors.area
|
||||
{
|
||||
Dictionary<string, Dictionary<uint, PrivateArea>> privateAreas = new Dictionary<string, Dictionary<uint, PrivateArea>>();
|
||||
Dictionary<string, List<PrivateAreaContent>> contentAreas = new Dictionary<string, List<PrivateAreaContent>>();
|
||||
Object contentAreasLock = new Object();
|
||||
object contentAreasLock = new object();
|
||||
|
||||
public SharpNav.TiledNavMesh tiledNavMesh;
|
||||
public SharpNav.NavMeshQuery navMeshQuery;
|
||||
|
||||
public Int64 pathCalls;
|
||||
public Int64 prevPathCalls = 0;
|
||||
public Int64 pathCallTime;
|
||||
public long pathCalls;
|
||||
public long prevPathCalls = 0;
|
||||
public long pathCallTime;
|
||||
|
||||
public Zone(uint id, string zoneName, ushort regionId, string classPath, ushort bgmDay, ushort bgmNight, ushort bgmBattle, bool isIsolated, bool isInn, bool canRideChocobo, bool canStealth, bool isInstanceRaid, bool loadNavMesh = false)
|
||||
: base(id, zoneName, regionId, classPath, bgmDay, bgmNight, bgmBattle, isIsolated, isInn, canRideChocobo, canStealth, isInstanceRaid)
|
||||
|
@ -152,7 +152,7 @@ namespace Meteor.Map.Actors
|
||||
public uint extraUint;
|
||||
public float extraFloat;
|
||||
|
||||
protected Dictionary<string, UInt64> tempVars = new Dictionary<string, UInt64>();
|
||||
protected Dictionary<string, ulong> tempVars = new Dictionary<string, ulong>();
|
||||
|
||||
//Inventory
|
||||
protected Dictionary<ushort, ItemPackage> itemPackages = new Dictionary<ushort, ItemPackage>();
|
||||
@ -227,8 +227,8 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
if (!effect.GetHidden())
|
||||
{
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.statusShownTime[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.statusShownTime[{0}]", i));
|
||||
i++;
|
||||
}
|
||||
}
|
||||
@ -908,9 +908,9 @@ namespace Meteor.Map.Actors
|
||||
AddTP((int)Math.Ceiling(tpModifier * action.amount));
|
||||
}
|
||||
|
||||
public UInt64 GetTempVar(string name)
|
||||
public ulong GetTempVar(string name)
|
||||
{
|
||||
UInt64 retVal = 0;
|
||||
ulong retVal = 0;
|
||||
if (tempVars.TryGetValue(name, out retVal))
|
||||
return retVal;
|
||||
return 0;
|
||||
@ -923,7 +923,7 @@ namespace Meteor.Map.Actors
|
||||
tempVars[name] = val;
|
||||
}
|
||||
|
||||
public void SetTempVar(string name, UInt64 val)
|
||||
public void SetTempVar(string name, ulong val)
|
||||
{
|
||||
if (tempVars.ContainsKey(name))
|
||||
tempVars[name] = val;
|
||||
@ -994,7 +994,7 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
shouldSend = true;
|
||||
charaWork.battleTemp.timingCommandFlag[i] = false;
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.timingCommandFlag[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.battleTemp.timingCommandFlag[{0}]", i));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1025,7 +1025,7 @@ namespace Meteor.Map.Actors
|
||||
if (this is Player)
|
||||
{
|
||||
var propPacketUtil = new ActorPropertyPacketUtil("charaWork/timingCommand", this);
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.timingCommandFlag[{0}]", procId));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.battleTemp.timingCommandFlag[{0}]", procId));
|
||||
((Player)this).QueuePackets(propPacketUtil.Done());
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ namespace Meteor.Map.actors.chara
|
||||
//These will need to be redone at some point. remember to update tables in db.
|
||||
//Consider using text_paramname sheet. that matches up with the stats on armor, but some things will need special handling
|
||||
//Also, 0-35 should probably match with up BattleTemp
|
||||
enum Modifier : UInt32
|
||||
enum Modifier : uint
|
||||
{
|
||||
//These line up with ParamNames starting at 15001 and appear on gear
|
||||
//Health
|
||||
|
@ -27,9 +27,9 @@ namespace Meteor.Map.actors.chara
|
||||
class ModifierListEntry
|
||||
{
|
||||
public uint id;
|
||||
public Int64 value;
|
||||
public long value;
|
||||
|
||||
public ModifierListEntry(uint id, Int64 value)
|
||||
public ModifierListEntry(uint id, long value)
|
||||
{
|
||||
this.id = id;
|
||||
this.value = value;
|
||||
@ -47,13 +47,13 @@ namespace Meteor.Map.actors.chara
|
||||
mobModList = new Dictionary<uint, ModifierListEntry>();
|
||||
}
|
||||
|
||||
public void AddModifier(uint id, Int64 val, bool isMobMod)
|
||||
public void AddModifier(uint id, long val, bool isMobMod)
|
||||
{
|
||||
var list = isMobMod ? mobModList : modList;
|
||||
list.Add(id, new ModifierListEntry(id, val));
|
||||
}
|
||||
|
||||
public void SetModifier(uint id, Int64 val, bool isMobMod)
|
||||
public void SetModifier(uint id, long val, bool isMobMod)
|
||||
{
|
||||
var list = isMobMod ? mobModList : modList;
|
||||
if (list.ContainsKey(id))
|
||||
@ -62,7 +62,7 @@ namespace Meteor.Map.actors.chara
|
||||
list.Add(id, new ModifierListEntry(id, val));
|
||||
}
|
||||
|
||||
public Int64 GetModifier(uint id, bool isMobMod)
|
||||
public long GetModifier(uint id, bool isMobMod)
|
||||
{
|
||||
ModifierListEntry retVal;
|
||||
var list = isMobMod ? mobModList : modList;
|
||||
|
@ -83,7 +83,7 @@ namespace Meteor.Map.Actors
|
||||
public ModifierList genusMods;
|
||||
public ModifierList spawnMods;
|
||||
|
||||
protected Dictionary<MobModifier, Int64> mobModifiers = new Dictionary<MobModifier, Int64>();
|
||||
protected Dictionary<MobModifier, long> mobModifiers = new Dictionary<MobModifier, long>();
|
||||
|
||||
public BattleNpc(int actorNumber, ActorClass actorClass, string uniqueId, Area spawnedArea, float posX, float posY, float posZ, float rot,
|
||||
ushort actorState, uint animationId, string customDisplayName)
|
||||
@ -320,7 +320,7 @@ namespace Meteor.Map.Actors
|
||||
}
|
||||
else
|
||||
{
|
||||
var err = String.Format("[{0}][{1}] {2} {3} {4} {5} tried to die ded", actorId, GetUniqueId(), positionX, positionY, positionZ, GetZone().GetName());
|
||||
var err = string.Format("[{0}][{1}] {2} {3} {4} {5} tried to die ded", actorId, GetUniqueId(), positionX, positionY, positionZ, GetZone().GetName());
|
||||
Program.Log.Error(err);
|
||||
//throw new Exception(err);
|
||||
}
|
||||
@ -434,20 +434,20 @@ namespace Meteor.Map.Actors
|
||||
this.bnpcId = id;
|
||||
}
|
||||
|
||||
public Int64 GetMobMod(MobModifier mobMod)
|
||||
public long GetMobMod(MobModifier mobMod)
|
||||
{
|
||||
return GetMobMod((uint)mobMod);
|
||||
}
|
||||
|
||||
public Int64 GetMobMod(uint mobModId)
|
||||
public long GetMobMod(uint mobModId)
|
||||
{
|
||||
Int64 res;
|
||||
long res;
|
||||
if (mobModifiers.TryGetValue((MobModifier)mobModId, out res))
|
||||
return res;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void SetMobMod(uint mobModId, Int64 val)
|
||||
public void SetMobMod(uint mobModId, long val)
|
||||
{
|
||||
if (mobModifiers.ContainsKey((MobModifier)mobModId))
|
||||
mobModifiers[(MobModifier)mobModId] = val;
|
||||
|
@ -81,7 +81,7 @@ namespace Meteor.Map.Actors
|
||||
LoadNpcAppearance(actorClass.actorClassId);
|
||||
|
||||
className = actorClass.classPath.Substring(actorClass.classPath.LastIndexOf("/") + 1);
|
||||
this.classPath = String.Format("{0}/{1}", actorClass.classPath.Substring(0, actorClass.classPath.LastIndexOf('/')).ToLower(), className);
|
||||
this.classPath = string.Format("{0}/{1}", actorClass.classPath.Substring(0, actorClass.classPath.LastIndexOf('/')).ToLower(), className);
|
||||
|
||||
charaWork.battleSave.potencial = 1.0f;
|
||||
|
||||
@ -109,8 +109,8 @@ namespace Meteor.Map.Actors
|
||||
isMapObj = false;
|
||||
else
|
||||
{
|
||||
layout = (uint)(Int32)lParams[4].value;
|
||||
instance = (uint)(Int32)lParams[5].value;
|
||||
layout = (uint)(int)lParams[4].value;
|
||||
instance = (uint)(int)lParams[5].value;
|
||||
isStatic = true;
|
||||
}
|
||||
}
|
||||
@ -236,7 +236,7 @@ namespace Meteor.Map.Actors
|
||||
for (int i = 0; i < charaWork.property.Length; i++)
|
||||
{
|
||||
if (charaWork.property[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.property[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.property[{0}]", i));
|
||||
}
|
||||
|
||||
//Parameters
|
||||
@ -261,14 +261,14 @@ namespace Meteor.Map.Actors
|
||||
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
||||
{
|
||||
if (charaWork.statusShownTime[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.statusShownTime[{0}]", i));
|
||||
}
|
||||
|
||||
//General Parameters
|
||||
for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++)
|
||||
{
|
||||
if (charaWork.battleTemp.generalParameter[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||
}
|
||||
|
||||
propPacketUtil.AddProperty("npcWork.hateType");
|
||||
@ -302,7 +302,7 @@ namespace Meteor.Map.Actors
|
||||
|
||||
public void LoadNpcAppearance(uint id)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -39,7 +39,7 @@ namespace Meteor.Map.actors.chara.npc
|
||||
{
|
||||
this.retainerId = retainerId;
|
||||
this.ownerPlayer = player;
|
||||
this.actorName = String.Format("_rtnre{0:x7}", actorId);
|
||||
this.actorName = string.Format("_rtnre{0:x7}", actorId);
|
||||
|
||||
itemPackages[ItemPackage.NORMAL] = new ItemPackage(this, MAXSIZE_INVENTORY_NORMAL, ItemPackage.NORMAL);
|
||||
itemPackages[ItemPackage.CURRENCY_CRYSTALS] = new ItemPackage(this, MAXSIZE_INVENTORY_CURRANCY, ItemPackage.CURRENCY_CRYSTALS);
|
||||
|
@ -46,6 +46,7 @@ using Meteor.Map.packets.send.actor.battle;
|
||||
using Meteor.Map.packets.receive.events;
|
||||
using static Meteor.Map.LuaUtils;
|
||||
using Meteor.Map.packets.send.actor.events;
|
||||
using Meteor.Map.DataObjects;
|
||||
|
||||
namespace Meteor.Map.Actors
|
||||
{
|
||||
@ -146,7 +147,7 @@ namespace Meteor.Map.Actors
|
||||
|
||||
//Quest Actors (MUST MATCH playerWork.questScenario/questGuildleve)
|
||||
public Quest[] questScenario = new Quest[16];
|
||||
public uint[] questGuildleve = new uint[8];
|
||||
public Quest[] questGuildleve = new Quest[8];
|
||||
|
||||
//Aetheryte
|
||||
public uint homepoint = 0;
|
||||
@ -161,6 +162,10 @@ namespace Meteor.Map.Actors
|
||||
public Retainer currentSpawnedRetainer = null;
|
||||
public bool sentRetainerSpawn = false;
|
||||
|
||||
//Crafting
|
||||
public List<Recipe> recentRecipes = new List<Recipe>();
|
||||
public List<Recipe> awardedRecipes = new List<Recipe>();
|
||||
|
||||
private List<Director> ownedDirectors = new List<Director>();
|
||||
private Director loginInitDirector = null;
|
||||
|
||||
@ -173,7 +178,7 @@ namespace Meteor.Map.Actors
|
||||
public Player(Session cp, uint actorID) : base(actorID)
|
||||
{
|
||||
playerSession = cp;
|
||||
actorName = String.Format("_pc{0:00000000}", actorID);
|
||||
actorName = string.Format("_pc{0:00000000}", actorID);
|
||||
className = "Player";
|
||||
|
||||
moveSpeeds[0] = SetActorSpeedPacket.DEFAULT_STOP;
|
||||
@ -274,6 +279,17 @@ namespace Meteor.Map.Actors
|
||||
this.aiContainer = new AIContainer(this, new PlayerController(this), null, new TargetFind(this));
|
||||
allegiance = CharacterTargetingAllegiance.Player;
|
||||
CalculateBaseStats();
|
||||
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(36));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(37));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(38));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(39));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(40));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(41));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(42));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(43));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(2));
|
||||
AddRecentRecipe(Server.ResolveRecipe().GetRecipeByID(3));
|
||||
}
|
||||
|
||||
public List<SubPacket> Create0x132Packets()
|
||||
@ -402,7 +418,7 @@ namespace Meteor.Map.Actors
|
||||
for (int i = 0; i < charaWork.property.Length; i++)
|
||||
{
|
||||
if (charaWork.property[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.property[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.property[{0}]", i));
|
||||
}
|
||||
|
||||
//Parameters
|
||||
@ -418,21 +434,21 @@ namespace Meteor.Map.Actors
|
||||
for (int i = 0; i < charaWork.statusShownTime.Length; i++)
|
||||
{
|
||||
if (charaWork.statusShownTime[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.statusShownTime[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.statusShownTime[{0}]", i));
|
||||
}
|
||||
|
||||
//General Parameters
|
||||
for (int i = 3; i < charaWork.battleTemp.generalParameter.Length; i++)
|
||||
{
|
||||
if (charaWork.battleTemp.generalParameter[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||
}
|
||||
|
||||
propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[0]");
|
||||
propPacketUtil.AddProperty("charaWork.battleTemp.castGauge_speed[1]");
|
||||
|
||||
//Battle Save Skillpoint
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.battleSave.skillPoint[{0}]", charaWork.parameterSave.state_mainSkill[0] - 1));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.battleSave.skillPoint[{0}]", charaWork.parameterSave.state_mainSkill[0] - 1));
|
||||
|
||||
//Commands
|
||||
propPacketUtil.AddProperty("charaWork.commandBorder");
|
||||
@ -443,12 +459,12 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
if (charaWork.command[i] != 0)
|
||||
{
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.command[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.command[{0}]", i));
|
||||
//Recast Timers
|
||||
if (i >= charaWork.commandBorder)
|
||||
{
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.parameterTemp.maxCommandRecastTime[{0}]", i - charaWork.commandBorder));
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i - charaWork.commandBorder));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.parameterTemp.maxCommandRecastTime[{0}]", i - charaWork.commandBorder));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i - charaWork.commandBorder));
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -457,32 +473,32 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
charaWork.commandCategory[i] = 1;
|
||||
if (charaWork.commandCategory[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.commandCategory[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.commandCategory[{0}]", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < charaWork.commandAcquired.Length; i++)
|
||||
{
|
||||
if (charaWork.commandAcquired[i] != false)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.commandAcquired[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.commandAcquired[{0}]", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < charaWork.additionalCommandAcquired.Length; i++)
|
||||
{
|
||||
if (charaWork.additionalCommandAcquired[i] != false)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.additionalCommandAcquired[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.additionalCommandAcquired[{0}]", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < charaWork.parameterSave.commandSlot_compatibility.Length; i++)
|
||||
{
|
||||
charaWork.parameterSave.commandSlot_compatibility[i] = true;
|
||||
if (charaWork.parameterSave.commandSlot_compatibility[i])
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", i));
|
||||
}
|
||||
|
||||
for (int i = 0; i < charaWork.parameterSave.commandSlot_recastTime.Length; i++)
|
||||
{
|
||||
if (charaWork.parameterSave.commandSlot_recastTime[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", i));
|
||||
}
|
||||
|
||||
//System
|
||||
@ -505,25 +521,25 @@ namespace Meteor.Map.Actors
|
||||
for (int i = 0; i < playerWork.questScenario.Length; i++)
|
||||
{
|
||||
if (playerWork.questScenario[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.questScenario[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.questScenario[{0}]", i));
|
||||
}
|
||||
|
||||
//Guildleve - Local
|
||||
for (int i = 0; i < playerWork.questGuildleve.Length; i++)
|
||||
{
|
||||
if (playerWork.questGuildleve[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.questGuildleve[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.questGuildleve[{0}]", i));
|
||||
}
|
||||
|
||||
//Guildleve - Regional
|
||||
for (int i = 0; i < work.guildleveId.Length; i++)
|
||||
{
|
||||
if (work.guildleveId[i] != 0)
|
||||
propPacketUtil.AddProperty(String.Format("work.guildleveId[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("work.guildleveId[{0}]", i));
|
||||
if (work.guildleveDone[i] != false)
|
||||
propPacketUtil.AddProperty(String.Format("work.guildleveDone[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("work.guildleveDone[{0}]", i));
|
||||
if (work.guildleveChecked[i] != false)
|
||||
propPacketUtil.AddProperty(String.Format("work.guildleveChecked[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("work.guildleveChecked[{0}]", i));
|
||||
}
|
||||
|
||||
//Bazaar
|
||||
@ -541,9 +557,9 @@ namespace Meteor.Map.Actors
|
||||
for (int i = 0; i < playerWork.npcLinkshellChatCalling.Length; i++)
|
||||
{
|
||||
if (playerWork.npcLinkshellChatCalling[i] != false)
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.npcLinkshellChatCalling[{0}]", i));
|
||||
if (playerWork.npcLinkshellChatExtra[i] != false)
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.npcLinkshellChatExtra[{0}]", i));
|
||||
}
|
||||
|
||||
propPacketUtil.AddProperty("playerWork.restBonusExpRate");
|
||||
@ -560,7 +576,7 @@ namespace Meteor.Map.Actors
|
||||
|
||||
public void SendSeamlessZoneInPackets()
|
||||
{
|
||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.bgmDay, SetMusicPacket.EFFECT_FADEIN));
|
||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.GetCurrentMusic(), SetMusicPacket.EFFECT_FADEIN));
|
||||
QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1));
|
||||
}
|
||||
|
||||
@ -583,7 +599,7 @@ namespace Meteor.Map.Actors
|
||||
}
|
||||
}
|
||||
else
|
||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.bgmDay, 0x01)); //Zone
|
||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.GetCurrentMusic(), 0x01)); //Zone
|
||||
|
||||
QueuePacket(SetWeatherPacket.BuildPacket(actorId, SetWeatherPacket.WEATHER_CLEAR, 1));
|
||||
|
||||
@ -806,11 +822,6 @@ namespace Meteor.Map.Actors
|
||||
Database.SavePlayerStatusEffects(this);
|
||||
}
|
||||
|
||||
public Area GetZone()
|
||||
{
|
||||
return zone;
|
||||
}
|
||||
|
||||
public void SendMessage(uint logType, string sender, string message)
|
||||
{
|
||||
QueuePacket(SendMessagePacket.BuildPacket(actorId, logType, sender, message));
|
||||
@ -895,6 +906,12 @@ namespace Meteor.Map.Actors
|
||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, musicId, 1));
|
||||
}
|
||||
|
||||
public void ResetMusic()
|
||||
{
|
||||
if (zone != null)
|
||||
QueuePacket(SetMusicPacket.BuildPacket(actorId, zone.GetCurrentMusic(), 1));
|
||||
}
|
||||
|
||||
public void SendMountAppearance()
|
||||
{
|
||||
if (mountState == 1)
|
||||
@ -1193,7 +1210,7 @@ namespace Meteor.Map.Actors
|
||||
propertyBuilder.NewTarget("playerWork/expBonus");
|
||||
propertyBuilder.AddProperty("playerWork.restBonusExpRate");
|
||||
propertyBuilder.NewTarget("charaWork/battleStateForSelf");
|
||||
propertyBuilder.AddProperty(String.Format("charaWork.battleSave.skillPoint[{0}]", classId - 1));
|
||||
propertyBuilder.AddProperty(string.Format("charaWork.battleSave.skillPoint[{0}]", classId - 1));
|
||||
Database.LoadHotbar(this);
|
||||
|
||||
var time = Utils.UnixTimeStampUTC();
|
||||
@ -1221,7 +1238,7 @@ namespace Meteor.Map.Actors
|
||||
Database.PlayerCharacterUpdateClassLevel(this, classId, level);
|
||||
charaWork.battleSave.skillLevel[classId - 1] = level;
|
||||
ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("charaWork/stateForAll", this);
|
||||
propertyBuilder.AddProperty(String.Format("charaWork.battleSave.skillLevel[{0}]", classId-1));
|
||||
propertyBuilder.AddProperty(string.Format("charaWork.battleSave.skillLevel[{0}]", classId-1));
|
||||
List<SubPacket> packets = propertyBuilder.Done();
|
||||
QueuePackets(packets);
|
||||
}
|
||||
@ -1363,6 +1380,16 @@ namespace Meteor.Map.Actors
|
||||
|
||||
return -1;
|
||||
}
|
||||
public int GetFreeQuestGuildleveSlot()
|
||||
{
|
||||
for (int i = 0; i < questGuildleve.Length; i++)
|
||||
{
|
||||
if (questGuildleve[i] == null)
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int GetFreeGuildleveSlot()
|
||||
{
|
||||
@ -1447,36 +1474,60 @@ namespace Meteor.Map.Actors
|
||||
}
|
||||
}
|
||||
}
|
||||
public void AddQuest(string name, bool isSilent = false)
|
||||
{
|
||||
Actor actor = Server.GetStaticActors(name);
|
||||
AddQuestInternal(actor as Quest, isSilent);
|
||||
}
|
||||
|
||||
public void AddQuest(uint id, bool isSilent = false)
|
||||
{
|
||||
Actor actor = Server.GetStaticActors((0xA0F00000 | id));
|
||||
AddQuest(actor.actorName, isSilent);
|
||||
AddQuestInternal(actor as Quest, isSilent);
|
||||
}
|
||||
|
||||
public void AddQuest(string name, bool isSilent = false)
|
||||
public void AddQuestGuildleve(uint id, byte difficulty)
|
||||
{
|
||||
Actor actor = Server.GetStaticActors(name);
|
||||
|
||||
if (actor == null)
|
||||
Quest staticQuest = (Quest) Server.GetStaticActors((0xA0F00000 | id));
|
||||
if (staticQuest == null)
|
||||
return;
|
||||
|
||||
uint id = actor.actorId;
|
||||
PassiveGuildleve newQuest = new PassiveGuildleve(staticQuest, this, difficulty);
|
||||
|
||||
int freeSlot = GetFreeQuestGuildleveSlot();
|
||||
|
||||
if (freeSlot == -1)
|
||||
return;
|
||||
|
||||
playerWork.questGuildleve[freeSlot] = newQuest.actorId;
|
||||
questGuildleve[freeSlot] = newQuest;
|
||||
|
||||
Database.SaveQuest(this, newQuest);
|
||||
SendQuestGuildleveClientUpdate(freeSlot);
|
||||
}
|
||||
|
||||
private void AddQuestInternal(Quest staticQuest, bool isSilent = false)
|
||||
{
|
||||
if (staticQuest == null)
|
||||
return;
|
||||
|
||||
Scenario newQuest = new Scenario(staticQuest, this, null, 0, 0);
|
||||
|
||||
int freeSlot = GetFreeQuestSlot();
|
||||
|
||||
if (freeSlot == -1)
|
||||
return;
|
||||
|
||||
playerWork.questScenario[freeSlot] = id;
|
||||
questScenario[freeSlot] = new Quest(this, playerWork.questScenario[freeSlot], name, null, 0, 0);
|
||||
Database.SaveQuest(this, questScenario[freeSlot]);
|
||||
playerWork.questScenario[freeSlot] = newQuest.actorId;
|
||||
questScenario[freeSlot] = newQuest;
|
||||
|
||||
Database.SaveQuest(this, newQuest);
|
||||
SendQuestClientUpdate(freeSlot);
|
||||
|
||||
if (!isSilent)
|
||||
{
|
||||
SendGameMessage(Server.GetWorldManager().GetActor(), 25224, 0x20, (object)questScenario[freeSlot].GetQuestId());
|
||||
questScenario[freeSlot].NextPhase(0);
|
||||
(questScenario[freeSlot] as Scenario).NextPhase(0);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1541,9 +1592,9 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
if (questScenario[i] != null && questScenario[i].GetQuestId() == oldId)
|
||||
{
|
||||
Actor actor = Server.GetStaticActors((0xA0F00000 | newId));
|
||||
Quest quest = Server.GetStaticActors((0xA0F00000 | newId)) as Quest;
|
||||
playerWork.questScenario[i] = (0xA0F00000 | newId);
|
||||
questScenario[i] = new Quest(this, playerWork.questScenario[i], actor.actorName, null, 0, 0);
|
||||
questScenario[i] = new Scenario(quest, this, null, 0, 0);
|
||||
Database.SaveQuest(this, questScenario[i]);
|
||||
SendQuestClientUpdate(i);
|
||||
break;
|
||||
@ -1598,6 +1649,16 @@ namespace Meteor.Map.Actors
|
||||
|
||||
return null;
|
||||
}
|
||||
public Quest GetQuestGuildleve(uint id)
|
||||
{
|
||||
for (int i = 0; i < questGuildleve.Length; i++)
|
||||
{
|
||||
if (questGuildleve[i] != null && questGuildleve[i].actorId == (0xA0F00000 | id))
|
||||
return questGuildleve[i];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public bool HasQuest(string name)
|
||||
{
|
||||
@ -1621,6 +1682,17 @@ namespace Meteor.Map.Actors
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool HasQuestGuildleve(uint id)
|
||||
{
|
||||
for (int i = 0; i < questGuildleve.Length; i++)
|
||||
{
|
||||
if (questGuildleve[i] != null && questGuildleve[i].actorId == (0xA0F00000 | id))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool HasGuildleve(uint id)
|
||||
{
|
||||
for (int i = 0; i < work.guildleveId.Length; i++)
|
||||
@ -1643,6 +1715,17 @@ namespace Meteor.Map.Actors
|
||||
return -1;
|
||||
}
|
||||
|
||||
public int GetQuestGuildleveSlot(uint id)
|
||||
{
|
||||
for (int i = 0; i < questGuildleve.Length; i++)
|
||||
{
|
||||
if (questGuildleve[i] != null && questGuildleve[i].actorId == (0xA0F00000 | id))
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
public void SetNpcLS(uint npcLSId, uint state)
|
||||
{
|
||||
bool isCalling, isExtra;
|
||||
@ -1679,30 +1762,36 @@ namespace Meteor.Map.Actors
|
||||
Database.SaveNpcLS(this, npcLSId, isCalling, isExtra);
|
||||
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("playerWork/npcLinkshellChat", this);
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatExtra[{0}]", npcLSId));
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.npcLinkshellChatCalling[{0}]", npcLSId));
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.npcLinkshellChatExtra[{0}]", npcLSId));
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.npcLinkshellChatCalling[{0}]", npcLSId));
|
||||
QueuePackets(propPacketUtil.Done());
|
||||
}
|
||||
|
||||
private void SendQuestClientUpdate(int slot)
|
||||
{
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("playerWork/journal", this);
|
||||
propPacketUtil.AddProperty(String.Format("playerWork.questScenario[{0}]", slot));
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.questScenario[{0}]", slot));
|
||||
QueuePackets(propPacketUtil.Done());
|
||||
}
|
||||
private void SendQuestGuildleveClientUpdate(int slot)
|
||||
{
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("playerWork/journal", this);
|
||||
propPacketUtil.AddProperty(string.Format("playerWork.questGuildleve[{0}]", slot));
|
||||
QueuePackets(propPacketUtil.Done());
|
||||
}
|
||||
|
||||
private void SendGuildleveClientUpdate(int slot)
|
||||
{
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("work/guildleve", this);
|
||||
propPacketUtil.AddProperty(String.Format("work.guildleveId[{0}]", slot));
|
||||
propPacketUtil.AddProperty(string.Format("work.guildleveId[{0}]", slot));
|
||||
QueuePackets(propPacketUtil.Done());
|
||||
}
|
||||
|
||||
private void SendGuildleveMarkClientUpdate(int slot)
|
||||
{
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("work/guildleve", this);
|
||||
propPacketUtil.AddProperty(String.Format("work.guildleveDone[{0}]", slot));
|
||||
propPacketUtil.AddProperty(String.Format("work.guildleveChecked[{0}]", slot));
|
||||
propPacketUtil.AddProperty(string.Format("work.guildleveDone[{0}]", slot));
|
||||
propPacketUtil.AddProperty(string.Format("work.guildleveChecked[{0}]", slot));
|
||||
QueuePackets(propPacketUtil.Done());
|
||||
}
|
||||
|
||||
@ -2035,9 +2124,34 @@ namespace Meteor.Map.Actors
|
||||
}
|
||||
}
|
||||
|
||||
public void AddRecentRecipe(Recipe recipe)
|
||||
{
|
||||
recentRecipes.Remove(recipe);
|
||||
if (recentRecipes.Count > 8)
|
||||
recentRecipes.RemoveAt(7);
|
||||
recentRecipes.Add(recipe);
|
||||
}
|
||||
|
||||
public List<Recipe> GetRecentRecipes()
|
||||
{
|
||||
return recentRecipes;
|
||||
}
|
||||
|
||||
public void AddAwardedRecipe(Recipe recipe)
|
||||
{
|
||||
awardedRecipes.Remove(recipe);
|
||||
if (awardedRecipes.Count > 8)
|
||||
awardedRecipes.RemoveAt(7);
|
||||
awardedRecipes.Add(recipe);
|
||||
}
|
||||
|
||||
public List<Recipe> GetAwardedRecipes()
|
||||
{
|
||||
return awardedRecipes;
|
||||
}
|
||||
|
||||
public override void Update(DateTime tick)
|
||||
{
|
||||
|
||||
// Chocobo Rental Expirey
|
||||
if (rentalExpireTime != 0)
|
||||
{
|
||||
@ -2048,7 +2162,7 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
rentalExpireTime = 0;
|
||||
rentalMinLeft = 0;
|
||||
ChangeMusic(GetZone().bgmDay);
|
||||
ResetMusic();
|
||||
SetMountState(0);
|
||||
ChangeSpeed(0.0f, 2.0f, 5.0f, 5.0f);
|
||||
ChangeState(0);
|
||||
@ -2102,7 +2216,7 @@ namespace Meteor.Map.Actors
|
||||
if (GetMod(i) != charaWork.battleTemp.generalParameter[i])
|
||||
{
|
||||
charaWork.battleTemp.generalParameter[i] = (short)GetMod(i);
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.battleTemp.generalParameter[{0}]", i));
|
||||
}
|
||||
}
|
||||
|
||||
@ -2149,8 +2263,8 @@ namespace Meteor.Map.Actors
|
||||
ActorPropertyPacketUtil propPacketUtil = new ActorPropertyPacketUtil("charaWork/command", this);
|
||||
foreach (ushort slot in slotsToUpdate)
|
||||
{
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.command[{0}]", slot));
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.commandCategory[{0}]", slot));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.command[{0}]", slot));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.commandCategory[{0}]", slot));
|
||||
}
|
||||
|
||||
propPacketUtil.NewTarget("charaWork/commandDetailForSelf");
|
||||
@ -2158,7 +2272,7 @@ namespace Meteor.Map.Actors
|
||||
foreach (ushort slot in slotsToUpdate)
|
||||
{
|
||||
charaWork.parameterSave.commandSlot_compatibility[slot - charaWork.commandBorder] = charaWork.command[slot] != 0;
|
||||
propPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", slot - charaWork.commandBorder));
|
||||
propPacketUtil.AddProperty(string.Format("charaWork.parameterSave.commandSlot_compatibility[{0}]", slot - charaWork.commandBorder));
|
||||
}
|
||||
|
||||
QueuePackets(propPacketUtil.Done());
|
||||
@ -2172,8 +2286,8 @@ namespace Meteor.Map.Actors
|
||||
|
||||
foreach (ushort slot in slotsToUpdate)
|
||||
{
|
||||
recastPacketUtil.AddProperty(String.Format("charaWork.parameterTemp.maxCommandRecastTime[{0}]", slot - charaWork.commandBorder));
|
||||
recastPacketUtil.AddProperty(String.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", slot - charaWork.commandBorder));
|
||||
recastPacketUtil.AddProperty(string.Format("charaWork.parameterTemp.maxCommandRecastTime[{0}]", slot - charaWork.commandBorder));
|
||||
recastPacketUtil.AddProperty(string.Format("charaWork.parameterSave.commandSlot_recastTime[{0}]", slot - charaWork.commandBorder));
|
||||
}
|
||||
|
||||
QueuePackets(recastPacketUtil.Done());
|
||||
@ -2595,7 +2709,7 @@ namespace Meteor.Map.Actors
|
||||
charaWork.battleSave.skillPoint[classId - 1] = 0;
|
||||
//send new level
|
||||
ActorPropertyPacketUtil levelPropertyPacket = new ActorPropertyPacketUtil("charaWork/stateForAll", this);
|
||||
levelPropertyPacket.AddProperty(String.Format("charaWork.battleSave.skillLevel[{0}]", classId - 1));
|
||||
levelPropertyPacket.AddProperty(string.Format("charaWork.battleSave.skillLevel[{0}]", classId - 1));
|
||||
levelPropertyPacket.AddProperty("charaWork.parameterSave.state_mainSkillLevel");
|
||||
QueuePackets(levelPropertyPacket.Done());
|
||||
|
||||
@ -2606,7 +2720,7 @@ namespace Meteor.Map.Actors
|
||||
charaWork.battleSave.skillPoint[classId - 1] = Math.Min(charaWork.battleSave.skillPoint[classId - 1] + exp, MAXEXP[GetLevel() - 1]);
|
||||
|
||||
ActorPropertyPacketUtil expPropertyPacket = new ActorPropertyPacketUtil("charaWork/battleStateForSelf", this);
|
||||
expPropertyPacket.AddProperty(String.Format("charaWork.battleSave.skillPoint[{0}]", classId - 1));
|
||||
expPropertyPacket.AddProperty(string.Format("charaWork.battleSave.skillPoint[{0}]", classId - 1));
|
||||
|
||||
QueuePackets(expPropertyPacket.Done());
|
||||
Database.SetExp(this, classId, charaWork.battleSave.skillPoint[classId - 1]);
|
||||
|
@ -239,7 +239,7 @@ namespace Meteor.Map.actors.director
|
||||
//Format Class Name
|
||||
string className = this.className;
|
||||
|
||||
className = Char.ToLowerInvariant(className[0]) + className.Substring(1);
|
||||
className = char.ToLowerInvariant(className[0]) + className.Substring(1);
|
||||
|
||||
//Format Zone Name
|
||||
string zoneName = zone.zoneName.Replace("Field", "Fld")
|
||||
@ -255,7 +255,7 @@ namespace Meteor.Map.actors.director
|
||||
//Check if "normal"
|
||||
zoneName = zoneName.Remove(zoneName.Length - 1, 1) + "P";
|
||||
}
|
||||
zoneName = Char.ToLowerInvariant(zoneName[0]) + zoneName.Substring(1);
|
||||
zoneName = char.ToLowerInvariant(zoneName[0]) + zoneName.Substring(1);
|
||||
|
||||
try
|
||||
{
|
||||
@ -273,7 +273,7 @@ namespace Meteor.Map.actors.director
|
||||
if (zone is PrivateArea)
|
||||
privLevel = ((PrivateArea)zone).GetPrivateAreaType();
|
||||
|
||||
actorName = String.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
|
||||
actorName = string.Format("{0}_{1}_{2}@{3:X3}{4:X2}", className, zoneName, classNumber, zoneId, privLevel);
|
||||
}
|
||||
|
||||
public string GetScriptPath()
|
||||
@ -283,7 +283,7 @@ namespace Meteor.Map.actors.director
|
||||
|
||||
private void LoadLuaScript()
|
||||
{
|
||||
string luaPath = String.Format(LuaEngine.FILEPATH_DIRECTORS, GetScriptPath());
|
||||
string luaPath = string.Format(LuaEngine.FILEPATH_DIRECTORS, GetScriptPath());
|
||||
directorScript = LuaEngine.LoadScript(luaPath);
|
||||
if (directorScript == null)
|
||||
Program.Log.Error("Could not find script for director {0}.", GetName());
|
||||
@ -293,7 +293,7 @@ namespace Meteor.Map.actors.director
|
||||
{
|
||||
if (directorScript != null)
|
||||
{
|
||||
directorScript = LuaEngine.LoadScript(String.Format(LuaEngine.FILEPATH_DIRECTORS, directorScriptPath));
|
||||
directorScript = LuaEngine.LoadScript(string.Format(LuaEngine.FILEPATH_DIRECTORS, directorScriptPath));
|
||||
if (!directorScript.Globals.Get(funcName).IsNil())
|
||||
{
|
||||
DynValue result = directorScript.Call(directorScript.Globals[funcName], args);
|
||||
|
@ -137,7 +137,7 @@ namespace Meteor.Map.actors.director
|
||||
|
||||
if (wasCompleted)
|
||||
{
|
||||
Npc aetheryteNode = zone.SpawnActor(1200040, String.Format("{0}:warpExit", guildleveOwner.actorName), guildleveOwner.positionX, guildleveOwner.positionY, guildleveOwner.positionZ);
|
||||
Npc aetheryteNode = zone.SpawnActor(1200040, string.Format("{0}:warpExit", guildleveOwner.actorName), guildleveOwner.positionX, guildleveOwner.positionY, guildleveOwner.positionZ);
|
||||
AddMember(aetheryteNode);
|
||||
|
||||
foreach (Actor a in GetPlayerMembers())
|
||||
@ -168,7 +168,7 @@ namespace Meteor.Map.actors.director
|
||||
foreach (Actor p in GetPlayerMembers())
|
||||
{
|
||||
Player player = (Player)p;
|
||||
player.ChangeMusic(player.GetZone().bgmDay);
|
||||
player.ResetMusic();
|
||||
}
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ namespace Meteor.Map.actors.director
|
||||
{
|
||||
guildleveWork.aimNumNow[index] = value;
|
||||
ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("guildleveWork/infoVariable", this);
|
||||
propertyBuilder.AddProperty(String.Format("guildleveWork.aimNumNow[{0}]", index));
|
||||
propertyBuilder.AddProperty(string.Format("guildleveWork.aimNumNow[{0}]", index));
|
||||
SendPacketsToPlayers(propertyBuilder.Done());
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ namespace Meteor.Map.actors.director
|
||||
{
|
||||
guildleveWork.uiState[index] = value;
|
||||
ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("guildleveWork/infoVariable", this);
|
||||
propertyBuilder.AddProperty(String.Format("guildleveWork.uiState[{0}]", index));
|
||||
propertyBuilder.AddProperty(string.Format("guildleveWork.uiState[{0}]", index));
|
||||
SendPacketsToPlayers(propertyBuilder.Done());
|
||||
}
|
||||
|
||||
@ -228,9 +228,9 @@ namespace Meteor.Map.actors.director
|
||||
guildleveWork.markerY[markerIndex] = y;
|
||||
guildleveWork.markerZ[markerIndex] = z;
|
||||
ActorPropertyPacketUtil propertyBuilder = new ActorPropertyPacketUtil("guildleveWork/marker", this);
|
||||
propertyBuilder.AddProperty(String.Format("guildleveWork.markerX[{0}]", markerIndex));
|
||||
propertyBuilder.AddProperty(String.Format("guildleveWork.markerY[{0}]", markerIndex));
|
||||
propertyBuilder.AddProperty(String.Format("guildleveWork.markerZ[{0}]", markerIndex));
|
||||
propertyBuilder.AddProperty(string.Format("guildleveWork.markerX[{0}]", markerIndex));
|
||||
propertyBuilder.AddProperty(string.Format("guildleveWork.markerY[{0}]", markerIndex));
|
||||
propertyBuilder.AddProperty(string.Format("guildleveWork.markerZ[{0}]", markerIndex));
|
||||
SendPacketsToPlayers(propertyBuilder.Done());
|
||||
}
|
||||
|
||||
|
139
Map Server/Actors/Quest/PassiveGuildleve.cs
Normal file
139
Map Server/Actors/Quest/PassiveGuildleve.cs
Normal file
@ -0,0 +1,139 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Map.dataobjects;
|
||||
using Meteor.Map.DataObjects;
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Meteor.Map.Actors
|
||||
{
|
||||
class PassiveGuildleve : Quest
|
||||
{
|
||||
private Recipe targetRecipe;
|
||||
|
||||
private byte currentDifficulty;
|
||||
private short numSuccesses;
|
||||
private short currentAttempt;
|
||||
|
||||
private bool hasMaterials;
|
||||
|
||||
private PassiveGuildleveData passiveGLData;
|
||||
|
||||
public PassiveGuildleve(Quest staticQuest, Player owner, byte currentDifficulty)
|
||||
: base(staticQuest, owner)
|
||||
{
|
||||
passiveGLData = Server.GetPassiveGLGamedata(GetQuestId());
|
||||
targetRecipe = Server.ResolveRecipe().GetRecipeByItemID(passiveGLData.objectiveItemId[currentDifficulty]);
|
||||
this.currentDifficulty = currentDifficulty;
|
||||
currentAttempt = 0;
|
||||
numSuccesses = 0;
|
||||
hasMaterials = false;
|
||||
}
|
||||
|
||||
public PassiveGuildleve(Quest staticQuest, Player owner, string questDataJson) : base(staticQuest, owner)
|
||||
{
|
||||
passiveGLData = Server.GetPassiveGLGamedata(GetQuestId());
|
||||
|
||||
Dictionary<string, object> questData = null;
|
||||
|
||||
if (questDataJson != null)
|
||||
questData = JsonConvert.DeserializeObject<Dictionary<string, object>>(questDataJson);
|
||||
|
||||
if (questData == null)
|
||||
questData = new Dictionary<string, object>();
|
||||
|
||||
currentDifficulty = questData.ContainsKey("currentDifficulty") ? (byte)questData["currentDifficulty"] : (byte)0;
|
||||
currentAttempt = questData.ContainsKey("currentAttempt") ? (short)questData["currentAttempt"] : (short)0;
|
||||
numSuccesses = questData.ContainsKey("numSuccesses") ? (short)questData["numSuccesses"] : (short)0;
|
||||
hasMaterials = questData.ContainsKey("hasMaterials") ? (bool)questData["hasMaterials"] : false;
|
||||
|
||||
targetRecipe = Server.ResolveRecipe().GetRecipeByItemID(passiveGLData.objectiveItemId[currentDifficulty]);
|
||||
}
|
||||
|
||||
public void CraftSuccess()
|
||||
{
|
||||
numSuccesses++;
|
||||
currentAttempt++;
|
||||
}
|
||||
|
||||
public void CraftFail()
|
||||
{
|
||||
currentAttempt++;
|
||||
}
|
||||
|
||||
public Recipe GetRecipe()
|
||||
{
|
||||
return targetRecipe;
|
||||
}
|
||||
|
||||
public int GetNumberOfSuccesses()
|
||||
{
|
||||
return numSuccesses;
|
||||
}
|
||||
|
||||
public int GetRemainingMaterials()
|
||||
{
|
||||
return passiveGLData.numberOfAttempts[currentDifficulty] - currentAttempt;
|
||||
}
|
||||
public int GetCurrentAttempt()
|
||||
{
|
||||
return currentAttempt;
|
||||
}
|
||||
|
||||
public int GetMaxAttempts()
|
||||
{
|
||||
return passiveGLData.numberOfAttempts[currentDifficulty];
|
||||
}
|
||||
|
||||
public byte GetCurrentDifficulty()
|
||||
{
|
||||
return currentDifficulty;
|
||||
}
|
||||
|
||||
public bool HasMaterials()
|
||||
{
|
||||
return hasMaterials;
|
||||
}
|
||||
|
||||
public PassiveGuildleveData GetPassiveGLData()
|
||||
{
|
||||
return passiveGLData;
|
||||
}
|
||||
|
||||
public override void SaveData()
|
||||
{
|
||||
Database.SaveQuest(owner, this);
|
||||
}
|
||||
|
||||
public override string GetSerializedQuestData()
|
||||
{
|
||||
Dictionary<string, object> questData = new Dictionary<string, object>
|
||||
{
|
||||
{ "currentDifficulty", currentDifficulty },
|
||||
{ "currentAttempt", currentAttempt },
|
||||
{ "itemsCompleted", numSuccesses },
|
||||
{ "hasMaterials", hasMaterials }
|
||||
};
|
||||
return JsonConvert.SerializeObject(questData, Formatting.Indented);
|
||||
}
|
||||
}
|
||||
}
|
@ -20,6 +20,7 @@ along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
using Meteor.Map.lua;
|
||||
using MySql.Data.MySqlClient;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -28,10 +29,7 @@ namespace Meteor.Map.Actors
|
||||
{
|
||||
class Quest : Actor
|
||||
{
|
||||
private Player owner;
|
||||
private uint currentPhase = 0;
|
||||
private uint questFlags = 0;
|
||||
private Dictionary<string, Object> questData = new Dictionary<string, object>();
|
||||
protected Player owner;
|
||||
|
||||
public Quest(uint actorID, string name)
|
||||
: base(actorID)
|
||||
@ -39,29 +37,10 @@ namespace Meteor.Map.Actors
|
||||
actorName = name;
|
||||
}
|
||||
|
||||
public Quest(Player owner, uint actorID, string name, string questDataJson, uint questFlags, uint currentPhase)
|
||||
: base(actorID)
|
||||
public Quest(Quest staticQuest, Player owner) : base(staticQuest.actorId)
|
||||
{
|
||||
this.owner = owner;
|
||||
actorName = name;
|
||||
this.questFlags = questFlags;
|
||||
|
||||
if (questDataJson != null)
|
||||
this.questData = JsonConvert.DeserializeObject<Dictionary<string, Object>>(questDataJson);
|
||||
else
|
||||
questData = null;
|
||||
|
||||
if (questData == null)
|
||||
questData = new Dictionary<string, object>();
|
||||
|
||||
this.currentPhase = currentPhase;
|
||||
}
|
||||
|
||||
public void SetQuestData(string dataName, object data)
|
||||
{
|
||||
questData[dataName] = data;
|
||||
|
||||
//Inform update
|
||||
actorName = staticQuest.actorName;
|
||||
}
|
||||
|
||||
public uint GetQuestId()
|
||||
@ -69,81 +48,8 @@ namespace Meteor.Map.Actors
|
||||
return actorId & 0xFFFFF;
|
||||
}
|
||||
|
||||
public object GetQuestData(string dataName)
|
||||
{
|
||||
if (questData.ContainsKey(dataName))
|
||||
return questData[dataName];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public void ClearQuestData()
|
||||
{
|
||||
questData.Clear();
|
||||
}
|
||||
|
||||
public void ClearQuestFlags()
|
||||
{
|
||||
questFlags = 0;
|
||||
}
|
||||
|
||||
public void SetQuestFlag(int bitIndex, bool value)
|
||||
{
|
||||
if (bitIndex >= 32)
|
||||
{
|
||||
Program.Log.Error("Tried to access bit flag >= 32 for questId: {0}", actorId);
|
||||
return;
|
||||
}
|
||||
|
||||
int mask = 1 << bitIndex;
|
||||
|
||||
if (value)
|
||||
questFlags |= (uint)(1 << bitIndex);
|
||||
else
|
||||
questFlags &= (uint)~(1 << bitIndex);
|
||||
|
||||
DoCompletionCheck();
|
||||
}
|
||||
|
||||
public bool GetQuestFlag(int bitIndex)
|
||||
{
|
||||
if (bitIndex >= 32)
|
||||
{
|
||||
Program.Log.Error("Tried to access bit flag >= 32 for questId: {0}", actorId);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return (questFlags & (1 << bitIndex)) == (1 << bitIndex);
|
||||
}
|
||||
|
||||
public uint GetPhase()
|
||||
{
|
||||
return currentPhase;
|
||||
}
|
||||
|
||||
public void NextPhase(uint phaseNumber)
|
||||
{
|
||||
currentPhase = phaseNumber;
|
||||
owner.SendGameMessage(Server.GetWorldManager().GetActor(), 25116, 0x20, (object)GetQuestId());
|
||||
SaveData();
|
||||
|
||||
DoCompletionCheck();
|
||||
}
|
||||
|
||||
public uint GetQuestFlags()
|
||||
{
|
||||
return questFlags;
|
||||
}
|
||||
|
||||
public string GetSerializedQuestData()
|
||||
{
|
||||
return JsonConvert.SerializeObject(questData, Formatting.Indented);
|
||||
}
|
||||
|
||||
public void SaveData()
|
||||
{
|
||||
Database.SaveQuest(owner, this);
|
||||
}
|
||||
public virtual void SaveData() { }
|
||||
public virtual string GetSerializedQuestData() { return null; }
|
||||
|
||||
public void DoCompletionCheck()
|
||||
{
|
||||
@ -161,5 +67,45 @@ namespace Meteor.Map.Actors
|
||||
owner.SendGameMessage(owner, Server.GetWorldManager().GetActor(), 25236, 0x20, (object)GetQuestId());
|
||||
}
|
||||
|
||||
public static Quest LoadQuestDB(Player player, MySqlDataReader reader)
|
||||
{
|
||||
uint questID = 0xA0F00000 | reader.GetUInt32("questId");
|
||||
Quest staticQuest = Server.GetStaticActors(questID) as Quest;
|
||||
string questData = null;
|
||||
|
||||
if (!reader.IsDBNull(reader.GetOrdinal("questData")))
|
||||
questData = reader.GetString("questData");
|
||||
else
|
||||
questData = "{}";
|
||||
|
||||
if (staticQuest.IsScenario())
|
||||
{
|
||||
uint questFlags = 0;
|
||||
uint currentPhase = 0;
|
||||
|
||||
if (!reader.IsDBNull(reader.GetOrdinal("questFlags")))
|
||||
questFlags = reader.GetUInt32("questFlags");
|
||||
|
||||
if (!reader.IsDBNull(reader.GetOrdinal("currentPhase")))
|
||||
currentPhase = reader.GetUInt32("currentPhase");
|
||||
|
||||
return new Scenario(staticQuest, player, questData, questFlags, currentPhase);
|
||||
}
|
||||
else if (staticQuest.IsCraftPassiveGuildleve())
|
||||
{
|
||||
return new PassiveGuildleve(staticQuest, player, questData);
|
||||
}
|
||||
throw new NotImplementedException("Unknown quest type added");
|
||||
}
|
||||
|
||||
public bool IsScenario()
|
||||
{
|
||||
return !IsCraftPassiveGuildleve();
|
||||
}
|
||||
|
||||
public bool IsCraftPassiveGuildleve()
|
||||
{
|
||||
return GetQuestId() > 120000 && GetQuestId() < 121024;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
140
Map Server/Actors/Quest/Scenario.cs
Normal file
140
Map Server/Actors/Quest/Scenario.cs
Normal file
@ -0,0 +1,140 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using Meteor.Map.lua;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Meteor.Map.Actors
|
||||
{
|
||||
class Scenario : Quest
|
||||
{
|
||||
private uint currentPhase = 0;
|
||||
private uint questFlags = 0;
|
||||
private Dictionary<string, object> questData = new Dictionary<string, object>();
|
||||
|
||||
public Scenario(uint actorID, string name)
|
||||
: base(actorID, name)
|
||||
{
|
||||
actorName = name;
|
||||
}
|
||||
|
||||
public Scenario(Quest staticQuest, Player owner, string questDataJson, uint questFlags, uint currentPhase)
|
||||
: base(staticQuest, owner)
|
||||
{
|
||||
this.questFlags = questFlags;
|
||||
|
||||
if (questDataJson != null)
|
||||
this.questData = JsonConvert.DeserializeObject<Dictionary<string, object>>(questDataJson);
|
||||
else
|
||||
questData = null;
|
||||
|
||||
if (questData == null)
|
||||
questData = new Dictionary<string, object>();
|
||||
|
||||
this.currentPhase = currentPhase;
|
||||
}
|
||||
|
||||
public void SetQuestData(string dataName, object data)
|
||||
{
|
||||
questData[dataName] = data;
|
||||
|
||||
//Inform update
|
||||
}
|
||||
|
||||
public object GetQuestData(string dataName)
|
||||
{
|
||||
if (questData.ContainsKey(dataName))
|
||||
return questData[dataName];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public void ClearQuestData()
|
||||
{
|
||||
questData.Clear();
|
||||
}
|
||||
|
||||
public void ClearQuestFlags()
|
||||
{
|
||||
questFlags = 0;
|
||||
}
|
||||
|
||||
public void SetQuestFlag(int bitIndex, bool value)
|
||||
{
|
||||
if (bitIndex >= 32)
|
||||
{
|
||||
Program.Log.Error("Tried to access bit flag >= 32 for questId: {0}", actorId);
|
||||
return;
|
||||
}
|
||||
|
||||
int mask = 1 << bitIndex;
|
||||
|
||||
if (value)
|
||||
questFlags |= (uint)(1 << bitIndex);
|
||||
else
|
||||
questFlags &= (uint)~(1 << bitIndex);
|
||||
|
||||
DoCompletionCheck();
|
||||
}
|
||||
|
||||
public bool GetQuestFlag(int bitIndex)
|
||||
{
|
||||
if (bitIndex >= 32)
|
||||
{
|
||||
Program.Log.Error("Tried to access bit flag >= 32 for questId: {0}", actorId);
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return (questFlags & (1 << bitIndex)) == (1 << bitIndex);
|
||||
}
|
||||
|
||||
public uint GetPhase()
|
||||
{
|
||||
return currentPhase;
|
||||
}
|
||||
|
||||
public void NextPhase(uint phaseNumber)
|
||||
{
|
||||
currentPhase = phaseNumber;
|
||||
owner.SendGameMessage(Server.GetWorldManager().GetActor(), 25116, 0x20, (object)GetQuestId());
|
||||
SaveData();
|
||||
|
||||
DoCompletionCheck();
|
||||
}
|
||||
|
||||
public uint GetQuestFlags()
|
||||
{
|
||||
return questFlags;
|
||||
}
|
||||
|
||||
public override string GetSerializedQuestData()
|
||||
{
|
||||
return JsonConvert.SerializeObject(questData, Formatting.Indented);
|
||||
}
|
||||
|
||||
public override void SaveData()
|
||||
{
|
||||
Database.SaveQuest(owner, this);
|
||||
}
|
||||
}
|
||||
}
|
@ -59,8 +59,8 @@ namespace Meteor.Map.Actors
|
||||
try
|
||||
{
|
||||
byte byteIn = binReader.ReadByte();
|
||||
byte byteOut = (Byte)(byteIn ^ 0x73);
|
||||
binWriter.Write((Byte)byteOut);
|
||||
byte byteOut = (byte)(byteIn ^ 0x73);
|
||||
binWriter.Write((byte)byteOut);
|
||||
}
|
||||
catch (EndOfStreamException) { break; }
|
||||
}
|
||||
|
92
Map Server/DataObjects/PassiveGuildleveData.cs
Normal file
92
Map Server/DataObjects/PassiveGuildleveData.cs
Normal file
@ -0,0 +1,92 @@
|
||||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2015-2019 Project Meteor Dev Team
|
||||
|
||||
This file is part of Project Meteor Server.
|
||||
|
||||
Project Meteor Server is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
Project Meteor Server is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with Project Meteor Server. If not, see <https:www.gnu.org/licenses/>.
|
||||
===========================================================================
|
||||
*/
|
||||
|
||||
using MySql.Data.MySqlClient;
|
||||
|
||||
namespace Meteor.Map.dataobjects
|
||||
{
|
||||
class PassiveGuildleveData
|
||||
{
|
||||
public readonly uint id;
|
||||
public readonly uint plateId;
|
||||
public readonly uint borderId;
|
||||
public readonly uint recommendedClass;
|
||||
public readonly uint issuingLocation;
|
||||
public readonly uint leveLocation;
|
||||
public readonly uint deliveryDisplayName;
|
||||
|
||||
public readonly int[] objectiveItemId;
|
||||
public readonly int[] objectiveQuantity;
|
||||
public readonly int[] rewardItemId;
|
||||
public readonly int[] rewardQuantity;
|
||||
public readonly int[] numberOfAttempts;
|
||||
public readonly int[] recommendedLevel;
|
||||
|
||||
public PassiveGuildleveData(MySqlDataReader reader)
|
||||
{
|
||||
id = reader.GetUInt32("id");
|
||||
plateId = reader.GetUInt32("plateId");
|
||||
borderId = reader.GetUInt32("borderId");
|
||||
recommendedClass = reader.GetUInt32("recommendedClass");
|
||||
issuingLocation = reader.GetUInt32("issuingLocation");
|
||||
leveLocation = reader.GetUInt32("guildleveLocation");
|
||||
deliveryDisplayName = reader.GetUInt32("deliveryDisplayName");
|
||||
|
||||
objectiveItemId = new int[4];
|
||||
objectiveQuantity = new int[4];
|
||||
rewardItemId = new int[4];
|
||||
rewardQuantity = new int[4];
|
||||
numberOfAttempts = new int[4];
|
||||
recommendedLevel = new int[4];
|
||||
|
||||
objectiveItemId[0] = reader.GetInt32("objectiveItemId1");
|
||||
objectiveItemId[1] = reader.GetInt32("objectiveItemId2");
|
||||
objectiveItemId[2] = reader.GetInt32("objectiveItemId3");
|
||||
objectiveItemId[3] = reader.GetInt32("objectiveItemId4");;
|
||||
|
||||
objectiveQuantity[0] = reader.GetInt32("objectiveQuantity1");
|
||||
objectiveQuantity[1] = reader.GetInt32("objectiveQuantity2");
|
||||
objectiveQuantity[2] = reader.GetInt32("objectiveQuantity3");
|
||||
objectiveQuantity[3] = reader.GetInt32("objectiveQuantity4");
|
||||
|
||||
rewardItemId[0] = reader.GetInt32("rewardItemId1");
|
||||
rewardItemId[1] = reader.GetInt32("rewardItemId2");
|
||||
rewardItemId[2] = reader.GetInt32("rewardItemId3");
|
||||
rewardItemId[3] = reader.GetInt32("rewardItemId4");
|
||||
|
||||
rewardQuantity[0] = reader.GetInt32("rewardQuantity1");
|
||||
rewardQuantity[1] = reader.GetInt32("rewardQuantity2");
|
||||
rewardQuantity[2] = reader.GetInt32("rewardQuantity3");
|
||||
rewardQuantity[3] = reader.GetInt32("rewardQuantity4");
|
||||
|
||||
numberOfAttempts[0] = reader.GetInt32("numberOfAttempts1");
|
||||
numberOfAttempts[1] = reader.GetInt32("numberOfAttempts2");
|
||||
numberOfAttempts[2] = reader.GetInt32("numberOfAttempts3");
|
||||
numberOfAttempts[3] = reader.GetInt32("numberOfAttempts4");
|
||||
|
||||
recommendedLevel[0] = reader.GetInt32("recommendedLevel1");
|
||||
recommendedLevel[1] = reader.GetInt32("recommendedLevel2");
|
||||
recommendedLevel[2] = reader.GetInt32("recommendedLevel3");
|
||||
recommendedLevel[3] = reader.GetInt32("recommendedLevel4");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
@ -8,16 +8,28 @@ namespace Meteor.Map.DataObjects
|
||||
{
|
||||
class Recipe
|
||||
{
|
||||
public readonly uint id;
|
||||
public readonly uint resultItemID;
|
||||
public readonly uint resultQuantity;
|
||||
public readonly uint[] materials;
|
||||
public readonly byte[] allowedCrafters;
|
||||
public readonly uint crystalId1;
|
||||
public readonly uint crystalId2;
|
||||
public readonly uint crystalQuantity1;
|
||||
public readonly uint crystalQuantity2;
|
||||
public readonly byte tier;
|
||||
|
||||
public Recipe(uint resultItemID, uint resultQuantity, byte[] allowedCrafters, byte tier)
|
||||
public Recipe(uint id, uint resultItemID, uint resultQuantity, uint[] materials, uint crystalId1, uint crystalQuantity1, uint crystalId2, uint crystalQuantity2, byte[] allowedCrafters, byte tier)
|
||||
{
|
||||
this.id = id;
|
||||
this.resultItemID = resultItemID;
|
||||
this.resultQuantity = resultQuantity;
|
||||
this.materials = materials;
|
||||
this.allowedCrafters = allowedCrafters;
|
||||
this.crystalId1 = crystalId1;
|
||||
this.crystalId2 = crystalId2;
|
||||
this.crystalQuantity1 = crystalQuantity1;
|
||||
this.crystalQuantity2 = crystalQuantity2;
|
||||
this.tier = tier;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Security.Cryptography;
|
||||
using System.Linq;
|
||||
using MoonSharp.Interpreter;
|
||||
|
||||
namespace Meteor.Map.DataObjects
|
||||
{
|
||||
@ -37,8 +39,6 @@ namespace Meteor.Map.DataObjects
|
||||
mats[6] = mat7;
|
||||
mats[7] = mat8;
|
||||
|
||||
Array.Sort(mats);
|
||||
|
||||
byte[] result = new byte[8 * sizeof(int)];
|
||||
Buffer.BlockCopy(mats, 0, result, 0, result.Length);
|
||||
string hash;
|
||||
@ -53,8 +53,33 @@ namespace Meteor.Map.DataObjects
|
||||
return null;
|
||||
}
|
||||
|
||||
public Recipe GetMatsForRecipe(uint recipeID)
|
||||
public Recipe GetRecipeByItemID(int objectiveItemID)
|
||||
{
|
||||
return recipeList.Where(recipe => recipe.Value.resultItemID == objectiveItemID).FirstOrDefault().Value;
|
||||
}
|
||||
|
||||
public DynValue RecipesToItemIdTable(List<Recipe> recipeList)
|
||||
{
|
||||
DynValue[] itemIDs = new DynValue[8];
|
||||
for (int i = 0; i < 8; i++)
|
||||
itemIDs[i] = recipeList != null && i < recipeList.Count ? DynValue.NewNumber(recipeList[i].resultItemID) : DynValue.NewNil();
|
||||
|
||||
return DynValue.NewTable(new Table(new Script(), itemIDs));
|
||||
}
|
||||
public DynValue RecipeToMatIdTable(Recipe recipe)
|
||||
{
|
||||
DynValue[] itemIDs = new DynValue[8];
|
||||
for (int i = 0; i < 8; i++)
|
||||
itemIDs[i] = DynValue.NewNumber(recipe.materials[i]);
|
||||
|
||||
return DynValue.NewTable(new Table(new Script(), itemIDs));
|
||||
}
|
||||
|
||||
public Recipe GetRecipeByID(uint recipeID)
|
||||
{
|
||||
if (recipeID == 0)
|
||||
return null;
|
||||
|
||||
if (recipeList.ContainsKey(recipeID))
|
||||
return recipeList[recipeID];
|
||||
else
|
||||
|
@ -42,10 +42,10 @@ namespace Meteor.Map
|
||||
class Database
|
||||
{
|
||||
|
||||
public static uint GetUserIdFromSession(String sessionId)
|
||||
public static uint GetUserIdFromSession(string sessionId)
|
||||
{
|
||||
uint id = 0;
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -74,7 +74,7 @@ namespace Meteor.Map
|
||||
|
||||
public static Dictionary<uint, ItemData> GetItemGamedata()
|
||||
{
|
||||
using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (var conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
Dictionary<uint, ItemData> gamedataItems = new Dictionary<uint, ItemData>();
|
||||
|
||||
@ -131,7 +131,7 @@ namespace Meteor.Map
|
||||
|
||||
public static Dictionary<uint, GuildleveData> GetGuildleveGamedata()
|
||||
{
|
||||
using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (var conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
Dictionary<uint, GuildleveData> gamedataGuildleves = new Dictionary<uint, GuildleveData>();
|
||||
|
||||
@ -151,7 +151,6 @@ namespace Meteor.Map
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
uint id = reader.GetUInt32("id");
|
||||
GuildleveData guildleve = new GuildleveData(reader);
|
||||
gamedataGuildleves.Add(guildleve.id, guildleve);
|
||||
}
|
||||
@ -170,9 +169,49 @@ namespace Meteor.Map
|
||||
}
|
||||
}
|
||||
|
||||
public static Dictionary<uint, PassiveGuildleveData> GetPassiveGuildleveGamedata()
|
||||
{
|
||||
using (var conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
Dictionary<uint, PassiveGuildleveData> gamedataPassiveGuildleves = new Dictionary<uint, PassiveGuildleveData>();
|
||||
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
|
||||
string query = @"
|
||||
SELECT
|
||||
*
|
||||
FROM gamedata_passivegl_craft
|
||||
";
|
||||
|
||||
MySqlCommand cmd = new MySqlCommand(query, conn);
|
||||
|
||||
using (MySqlDataReader reader = cmd.ExecuteReader())
|
||||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
PassiveGuildleveData passiveGL = new PassiveGuildleveData(reader);
|
||||
gamedataPassiveGuildleves.Add(passiveGL.id, passiveGL);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
Program.Log.Error(e.ToString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
conn.Dispose();
|
||||
}
|
||||
|
||||
return gamedataPassiveGuildleves;
|
||||
}
|
||||
}
|
||||
|
||||
public static bool GetRecipeGamedata(Dictionary<uint, Recipe> recipeList, Dictionary<string, List<Recipe>> matToRecipe)
|
||||
{
|
||||
using (var conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (var conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -227,10 +266,6 @@ namespace Meteor.Map
|
||||
mats[6] = reader.GetUInt32("material6");
|
||||
mats[7] = reader.GetUInt32("material7");
|
||||
|
||||
Array.Sort(mats);
|
||||
|
||||
Recipe recipe = new Recipe(craftedItem, craftedQuantity, new byte[] { }, 1);
|
||||
|
||||
//Hash for the Mat -> Recipe Dictionary
|
||||
byte[] result = new byte[8 * sizeof(int)];
|
||||
Buffer.BlockCopy(mats, 0, result, 0, result.Length);
|
||||
@ -243,9 +278,12 @@ namespace Meteor.Map
|
||||
if (!matToRecipe.ContainsKey(hash))
|
||||
matToRecipe.Add(hash, new List<Recipe>());
|
||||
|
||||
//Create obj
|
||||
Recipe recipe = new Recipe(recipeID, craftedItem, craftedQuantity, mats, crystal0ID, crystal0Quantity, crystal1ID, crystal1Quantity, new byte[] { }, 1);
|
||||
|
||||
//Add to both Dictionaries
|
||||
recipeList.Add(recipeID, new Recipe(craftedItem, craftedQuantity, new byte[] { }, 1));
|
||||
matToRecipe[hash].Add(new Recipe(craftedItem, craftedQuantity, new byte[] { }, 1));
|
||||
recipeList.Add(recipeID, recipe);
|
||||
matToRecipe[hash].Add(recipe);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -268,7 +306,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -326,7 +364,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -362,7 +400,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -412,7 +450,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -446,7 +484,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -494,7 +532,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -513,9 +551,13 @@ namespace Meteor.Map
|
||||
cmd.Parameters.AddWithValue("@charaId", player.actorId);
|
||||
cmd.Parameters.AddWithValue("@slot", slot);
|
||||
cmd.Parameters.AddWithValue("@questId", 0xFFFFF & quest.actorId);
|
||||
cmd.Parameters.AddWithValue("@phase", quest.GetPhase());
|
||||
cmd.Parameters.AddWithValue("@questData", quest.GetSerializedQuestData());
|
||||
cmd.Parameters.AddWithValue("@questFlags", quest.GetQuestFlags());
|
||||
|
||||
if (quest.IsScenario())
|
||||
{
|
||||
cmd.Parameters.AddWithValue("@phase", (quest as Scenario).GetPhase());
|
||||
cmd.Parameters.AddWithValue("@questFlags", (quest as Scenario).GetQuestFlags());
|
||||
}
|
||||
|
||||
cmd.ExecuteNonQuery();
|
||||
}
|
||||
@ -535,7 +577,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -571,7 +613,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -611,7 +653,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -644,7 +686,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -677,7 +719,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -711,7 +753,7 @@ namespace Meteor.Map
|
||||
public static bool IsQuestCompleted(Player player, uint questId)
|
||||
{
|
||||
bool isCompleted = false;
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -738,7 +780,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1157,26 +1199,9 @@ namespace Meteor.Map
|
||||
while (reader.Read())
|
||||
{
|
||||
int index = reader.GetUInt16(0);
|
||||
player.playerWork.questScenario[index] = 0xA0F00000 | reader.GetUInt32(1);
|
||||
string questData = null;
|
||||
uint questFlags = 0;
|
||||
uint currentPhase = 0;
|
||||
|
||||
if (!reader.IsDBNull(2))
|
||||
questData = reader.GetString(2);
|
||||
else
|
||||
questData = "{}";
|
||||
|
||||
if (!reader.IsDBNull(3))
|
||||
questFlags = reader.GetUInt32(3);
|
||||
else
|
||||
questFlags = 0;
|
||||
|
||||
if (!reader.IsDBNull(4))
|
||||
currentPhase = reader.GetUInt32(4);
|
||||
|
||||
string questName = Server.GetStaticActors(player.playerWork.questScenario[index]).actorName;
|
||||
player.questScenario[index] = new Quest(player, player.playerWork.questScenario[index], questName, questData, questFlags, currentPhase);
|
||||
Quest quest = Quest.LoadQuestDB(player, reader);
|
||||
player.questScenario[index] = quest;
|
||||
player.playerWork.questScenario[index] = quest.actorId;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1185,6 +1210,7 @@ namespace Meteor.Map
|
||||
SELECT
|
||||
slot,
|
||||
questId,
|
||||
questData,
|
||||
abandoned,
|
||||
completed
|
||||
FROM characters_quest_guildleve_local WHERE characterId = @charId";
|
||||
@ -1196,7 +1222,9 @@ namespace Meteor.Map
|
||||
while (reader.Read())
|
||||
{
|
||||
int index = reader.GetUInt16(0);
|
||||
player.playerWork.questGuildleve[index] = 0xA0F00000 | reader.GetUInt32(1);
|
||||
Quest quest = Quest.LoadQuestDB(player, reader);
|
||||
player.questGuildleve[index] = quest;
|
||||
player.playerWork.questGuildleve[index] = quest.actorId;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1267,7 +1295,7 @@ namespace Meteor.Map
|
||||
{
|
||||
InventoryItem[] equipment = new InventoryItem[player.GetEquipment().GetCapacity()];
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1311,7 +1339,7 @@ namespace Meteor.Map
|
||||
public static void EquipItem(Player player, ushort equipSlot, ulong uniqueItemId)
|
||||
{
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1348,7 +1376,7 @@ namespace Meteor.Map
|
||||
public static void UnequipItem(Player player, ushort equipSlot)
|
||||
{
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1383,7 +1411,7 @@ namespace Meteor.Map
|
||||
if (commandId > 0)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(
|
||||
String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}",
|
||||
string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}",
|
||||
ConfigConstants.DATABASE_HOST,
|
||||
ConfigConstants.DATABASE_PORT,
|
||||
ConfigConstants.DATABASE_NAME,
|
||||
@ -1428,7 +1456,7 @@ namespace Meteor.Map
|
||||
public static void UnequipAbility(Player player, ushort hotbarSlot)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(
|
||||
String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}",
|
||||
string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}",
|
||||
ConfigConstants.DATABASE_HOST,
|
||||
ConfigConstants.DATABASE_PORT,
|
||||
ConfigConstants.DATABASE_NAME,
|
||||
@ -1468,7 +1496,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1519,7 +1547,7 @@ namespace Meteor.Map
|
||||
{
|
||||
ushort slot = 0;
|
||||
using (MySqlConnection conn = new MySqlConnection(
|
||||
String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}",
|
||||
string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}",
|
||||
ConfigConstants.DATABASE_HOST,
|
||||
ConfigConstants.DATABASE_PORT,
|
||||
ConfigConstants.DATABASE_NAME,
|
||||
@ -1571,7 +1599,7 @@ namespace Meteor.Map
|
||||
{
|
||||
List<InventoryItem> items = new List<InventoryItem>();
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1651,7 +1679,7 @@ namespace Meteor.Map
|
||||
{
|
||||
InventoryItem insertedItem = null;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1704,7 +1732,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void AddItem(Character owner, InventoryItem addedItem, ushort itemPackage, ushort slot)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1739,7 +1767,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void RemoveItem(Character owner, ulong serverItemId)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}; Allow User Variables=True", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}; Allow User Variables=True", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1769,7 +1797,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void UpdateItemPositions(List<InventoryItem> updated)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1811,7 +1839,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void SetQuantity(ulong serverItemId, int quantity)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1843,7 +1871,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void SetDealingInfo(InventoryItem item)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1872,7 +1900,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void ClearDealingInfo(InventoryItem item)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1902,7 +1930,7 @@ namespace Meteor.Map
|
||||
public static SubPacket GetLatestAchievements(Player player)
|
||||
{
|
||||
uint[] latestAchievements = new uint[5];
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1944,7 +1972,7 @@ namespace Meteor.Map
|
||||
{
|
||||
SetCompletedAchievementsPacket cheevosPacket = new SetCompletedAchievementsPacket();
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -1989,7 +2017,7 @@ namespace Meteor.Map
|
||||
public static SubPacket GetAchievementProgress(Player player, uint achievementId)
|
||||
{
|
||||
uint progress = 0, progressFlags = 0;
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2027,7 +2055,7 @@ namespace Meteor.Map
|
||||
public static bool CreateLinkshell(Player player, string lsName, ushort lsCrest)
|
||||
{
|
||||
bool success = false;
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2067,7 +2095,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2107,7 +2135,7 @@ namespace Meteor.Map
|
||||
MySqlCommand cmd;
|
||||
bool wasError = false;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2144,7 +2172,7 @@ namespace Meteor.Map
|
||||
public static bool isTicketOpen(string playerName)
|
||||
{
|
||||
bool isOpen = false;
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2185,7 +2213,7 @@ namespace Meteor.Map
|
||||
public static void closeTicket(string playerName)
|
||||
{
|
||||
bool isOpen = false;
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2217,7 +2245,7 @@ namespace Meteor.Map
|
||||
{
|
||||
string[] faqs = null;
|
||||
List<string> raw = new List<string>();
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2260,7 +2288,7 @@ namespace Meteor.Map
|
||||
public static string getFAQBody(uint slot, uint langCode = 1)
|
||||
{
|
||||
string body = string.Empty;
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2300,7 +2328,7 @@ namespace Meteor.Map
|
||||
{
|
||||
string[] issues = null;
|
||||
List<string> raw = new List<string>();
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2341,7 +2369,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2379,7 +2407,7 @@ namespace Meteor.Map
|
||||
string query;
|
||||
MySqlCommand cmd;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2413,7 +2441,7 @@ namespace Meteor.Map
|
||||
{
|
||||
var effects = new Dictionary<uint, StatusEffect>();
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2461,7 +2489,7 @@ namespace Meteor.Map
|
||||
{
|
||||
string[] faqs = null;
|
||||
List<string> raw = new List<string>();
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2508,7 +2536,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void LoadGlobalBattleCommandList(Dictionary<ushort, BattleCommand> battleCommandDict, Dictionary<Tuple<byte, short>, List<ushort>> battleCommandIdByLevel)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2608,7 +2636,7 @@ namespace Meteor.Map
|
||||
}
|
||||
}
|
||||
|
||||
Program.Log.Info(String.Format("Loaded {0} battle commands.", count));
|
||||
Program.Log.Info(string.Format("Loaded {0} battle commands.", count));
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
@ -2623,7 +2651,7 @@ namespace Meteor.Map
|
||||
|
||||
public static void LoadGlobalBattleTraitList(Dictionary<ushort, BattleTrait> battleTraitDict, Dictionary<byte, List<ushort>> battleTraitJobDict)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2662,7 +2690,7 @@ namespace Meteor.Map
|
||||
count++;
|
||||
}
|
||||
}
|
||||
Program.Log.Info(String.Format("Loaded {0} battle traits.", count));
|
||||
Program.Log.Info(string.Format("Loaded {0} battle traits.", count));
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
@ -2677,13 +2705,13 @@ namespace Meteor.Map
|
||||
|
||||
public static void SetExp(Player player, byte classId, int exp)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
|
||||
var query = String.Format(@"
|
||||
var query = string.Format(@"
|
||||
UPDATE characters_class_exp
|
||||
SET
|
||||
{0} = @exp
|
||||
@ -2710,13 +2738,13 @@ namespace Meteor.Map
|
||||
|
||||
public static void SetLevel(Player player, byte classId, short level)
|
||||
{
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
|
||||
var query = String.Format(@"
|
||||
var query = string.Format(@"
|
||||
UPDATE characters_class_levels
|
||||
SET
|
||||
{0} = @lvl
|
||||
@ -2745,7 +2773,7 @@ namespace Meteor.Map
|
||||
{
|
||||
Retainer retainer = null;
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -2843,13 +2871,13 @@ namespace Meteor.Map
|
||||
"fsh"
|
||||
};
|
||||
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
using (MySqlConnection conn = new MySqlConnection(string.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
try
|
||||
{
|
||||
conn.Open();
|
||||
|
||||
query = String.Format(@"
|
||||
query = string.Format(@"
|
||||
UPDATE characters_class_levels
|
||||
SET
|
||||
{0}=@level
|
||||
|
@ -143,7 +143,7 @@ namespace Meteor.Map.lua
|
||||
}
|
||||
catch (ScriptRuntimeException e)
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("OnEventUpdated: {0}", e.DecoratedMessage));
|
||||
LuaEngine.SendError(player, string.Format("OnEventUpdated: {0}", e.DecoratedMessage));
|
||||
player.EndEvent();
|
||||
}
|
||||
}
|
||||
@ -170,7 +170,7 @@ namespace Meteor.Map.lua
|
||||
{
|
||||
// todo: this is probably unnecessary as im not sure there were pets for players
|
||||
if (!(actor.aiContainer.GetController<PetController>()?.GetPetMaster() is Player))
|
||||
path = String.Format("./scripts/unique/{0}/{1}/{2}.lua", actor.zone.zoneName, actor is BattleNpc ? "Monster" : "PopulaceStandard", ((Npc)actor).GetUniqueId());
|
||||
path = string.Format("./scripts/unique/{0}/{1}/{2}.lua", actor.zone.zoneName, actor is BattleNpc ? "Monster" : "PopulaceStandard", ((Npc)actor).GetUniqueId());
|
||||
}
|
||||
// dont wanna throw an error if file doesnt exist
|
||||
if (File.Exists(path))
|
||||
@ -358,7 +358,7 @@ namespace Meteor.Map.lua
|
||||
{
|
||||
if (target is Player)
|
||||
{
|
||||
return String.Format(FILEPATH_PLAYER);
|
||||
return string.Format(FILEPATH_PLAYER);
|
||||
}
|
||||
else if (target is Npc)
|
||||
{
|
||||
@ -366,25 +366,25 @@ namespace Meteor.Map.lua
|
||||
}
|
||||
else if (target is Command)
|
||||
{
|
||||
return String.Format(FILEPATH_COMMANDS, target.GetName());
|
||||
return string.Format(FILEPATH_COMMANDS, target.GetName());
|
||||
}
|
||||
else if (target is Director)
|
||||
{
|
||||
return String.Format(FILEPATH_DIRECTORS, ((Director)target).GetScriptPath());
|
||||
return string.Format(FILEPATH_DIRECTORS, ((Director)target).GetScriptPath());
|
||||
}
|
||||
else if (target is PrivateAreaContent)
|
||||
{
|
||||
return String.Format(FILEPATH_CONTENT, ((PrivateAreaContent)target).GetPrivateAreaName());
|
||||
return string.Format(FILEPATH_CONTENT, ((PrivateAreaContent)target).GetPrivateAreaName());
|
||||
}
|
||||
else if (target is Area)
|
||||
{
|
||||
return String.Format(FILEPATH_ZONE, ((Area)target).zoneName);
|
||||
return string.Format(FILEPATH_ZONE, ((Area)target).zoneName);
|
||||
}
|
||||
else if (target is Quest)
|
||||
{
|
||||
string initial = ((Quest)target).actorName.Substring(0, 3);
|
||||
string questName = ((Quest)target).actorName;
|
||||
return String.Format(FILEPATH_QUEST, initial, questName);
|
||||
return string.Format(FILEPATH_QUEST, initial, questName);
|
||||
}
|
||||
else
|
||||
return "";
|
||||
@ -410,18 +410,18 @@ namespace Meteor.Map.lua
|
||||
Area area = target.zone;
|
||||
if (area is PrivateArea)
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId()));
|
||||
if (File.Exists(string.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(string.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId()));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId()));
|
||||
if (File.Exists(string.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(string.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId()));
|
||||
}
|
||||
|
||||
if (parent == null && child == null)
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
|
||||
LuaEngine.SendError(player, string.Format("ERROR: Could not find script for actor {0}.", target.GetName()));
|
||||
}
|
||||
|
||||
//Run Script
|
||||
@ -458,18 +458,18 @@ namespace Meteor.Map.lua
|
||||
Area area = target.zone;
|
||||
if (area is PrivateArea)
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId()));
|
||||
if (File.Exists(string.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(string.Format("./scripts/unique/{0}/privatearea/{1}_{2}/{3}/{4}.lua", area.zoneName, ((PrivateArea)area).GetPrivateAreaName(), ((PrivateArea)area).GetPrivateAreaType(), target.className, target.GetUniqueId()));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (File.Exists(String.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(String.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId()));
|
||||
if (File.Exists(string.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId())))
|
||||
child = LuaEngine.LoadScript(string.Format("./scripts/unique/{0}/{1}/{2}.lua", area.zoneName, target.className, target.GetUniqueId()));
|
||||
}
|
||||
|
||||
if (parent == null && child == null)
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("Could not find script for actor {0}.", target.GetName()));
|
||||
LuaEngine.SendError(player, string.Format("Could not find script for actor {0}.", target.GetName()));
|
||||
return;
|
||||
}
|
||||
|
||||
@ -525,13 +525,13 @@ namespace Meteor.Map.lua
|
||||
else
|
||||
{
|
||||
if (!optional)
|
||||
SendError(player, String.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName()));
|
||||
SendError(player, string.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!optional)
|
||||
SendError(player, String.Format("Could not find script for actor {0}.", target.GetName()));
|
||||
SendError(player, string.Format("Could not find script for actor {0}.", target.GetName()));
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@ -589,13 +589,13 @@ namespace Meteor.Map.lua
|
||||
else
|
||||
{
|
||||
if (!optional)
|
||||
SendError(player, String.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName()));
|
||||
SendError(player, string.Format("Could not find function '{0}' for actor {1}.", funcName, target.GetName()));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!(target is Area) && !optional)
|
||||
SendError(player, String.Format("Could not find script for actor {0}.", target.GetName()));
|
||||
SendError(player, string.Format("Could not find script for actor {0}.", target.GetName()));
|
||||
}
|
||||
}
|
||||
|
||||
@ -616,7 +616,7 @@ namespace Meteor.Map.lua
|
||||
}
|
||||
catch (ScriptRuntimeException e)
|
||||
{
|
||||
LuaEngine.SendError(player, String.Format("OnEventStarted: {0}", e.DecoratedMessage));
|
||||
LuaEngine.SendError(player, string.Format("OnEventStarted: {0}", e.DecoratedMessage));
|
||||
player.EndEvent();
|
||||
}
|
||||
}
|
||||
@ -660,7 +660,7 @@ namespace Meteor.Map.lua
|
||||
}
|
||||
|
||||
#region RunGMCommand
|
||||
public static void RunGMCommand(Player player, String cmd, string[] param, bool help = false)
|
||||
public static void RunGMCommand(Player player, string cmd, string[] param, bool help = false)
|
||||
{
|
||||
bool playerNull = player == null;
|
||||
|
||||
@ -676,7 +676,7 @@ namespace Meteor.Map.lua
|
||||
player = Server.GetWorldManager().GetPCInWorld(param[1] + " " + param[2]);
|
||||
|
||||
// load from scripts/commands/gm/ directory
|
||||
var path = String.Format("./scripts/commands/gm/{0}.lua", cmd.ToLower());
|
||||
var path = string.Format("./scripts/commands/gm/{0}.lua", cmd.ToLower());
|
||||
|
||||
// check if the file exists
|
||||
if (File.Exists(path))
|
||||
@ -747,7 +747,7 @@ namespace Meteor.Map.lua
|
||||
// i hate to do this, but cant think of a better way to keep !help
|
||||
else if (help)
|
||||
{
|
||||
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, String.Format("[Commands] [{0}]", cmd), description);
|
||||
player.SendMessage(SendMessagePacket.MESSAGE_TYPE_SYSTEM_ERROR, string.Format("[Commands] [{0}]", cmd), description);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -851,6 +851,7 @@ namespace Meteor.Map.lua
|
||||
script.Globals["GetWorldMaster"] = (Func<Actor>)Server.GetWorldManager().GetActor;
|
||||
script.Globals["GetItemGamedata"] = (Func<uint, ItemData>)Server.GetItemGamedata;
|
||||
script.Globals["GetGuildleveGamedata"] = (Func<uint, GuildleveData>)Server.GetGuildleveGamedata;
|
||||
script.Globals["GetPassiveGLGamedata"] = (Func<uint, PassiveGuildleveData>)Server.GetPassiveGLGamedata;
|
||||
script.Globals["GetRecipeResolver"] = (Func<RecipeResolver>)Server.ResolveRecipe;
|
||||
script.Globals["GetLuaInstance"] = (Func<LuaEngine>)LuaEngine.GetInstance;
|
||||
|
||||
|
@ -26,9 +26,9 @@ namespace Meteor.Map.lua
|
||||
class LuaParam
|
||||
{
|
||||
public int typeID;
|
||||
public Object value;
|
||||
public object value;
|
||||
|
||||
public LuaParam(int type, Object value)
|
||||
public LuaParam(int type, object value)
|
||||
{
|
||||
this.typeID = type;
|
||||
this.value = value;
|
||||
|
@ -25,6 +25,7 @@ using Meteor.Map.lua;
|
||||
using MoonSharp.Interpreter;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
@ -158,7 +159,7 @@ namespace Meteor.Map
|
||||
isDone = true;
|
||||
continue;
|
||||
default:
|
||||
throw new ArgumentException("Unknown lua param...");
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
|
||||
if (isDone)
|
||||
@ -287,22 +288,22 @@ namespace Meteor.Map
|
||||
foreach (LuaParam l in luaParams)
|
||||
{
|
||||
if (l.typeID == 0x1)
|
||||
writer.Write((Byte)0);
|
||||
writer.Write((byte)0);
|
||||
else
|
||||
writer.Write((Byte)l.typeID);
|
||||
writer.Write((byte)l.typeID);
|
||||
|
||||
switch (l.typeID)
|
||||
{
|
||||
case 0x0: //Int32
|
||||
writer.Write((Int32)Utils.SwapEndian((Int32)l.value));
|
||||
writer.Write((int)Utils.SwapEndian((int)l.value));
|
||||
break;
|
||||
case 0x1: //Int32
|
||||
writer.Write((UInt32)Utils.SwapEndian((UInt32)l.value));
|
||||
writer.Write((uint)Utils.SwapEndian((uint)l.value));
|
||||
break;
|
||||
case 0x2: //Null Termed String
|
||||
string sv = (string)l.value;
|
||||
writer.Write(Encoding.ASCII.GetBytes(sv), 0, Encoding.ASCII.GetByteCount(sv));
|
||||
writer.Write((Byte)0);
|
||||
writer.Write((byte)0);
|
||||
break;
|
||||
case 0x3: //Boolean True
|
||||
break;
|
||||
@ -311,21 +312,21 @@ namespace Meteor.Map
|
||||
case 0x5: //Nil
|
||||
break;
|
||||
case 0x6: //Actor (By Id)
|
||||
writer.Write((UInt32)Utils.SwapEndian((UInt32)l.value));
|
||||
writer.Write((uint)Utils.SwapEndian((uint)l.value));
|
||||
break;
|
||||
case 0x7: //Weird one used for inventory
|
||||
ItemRefParam type7 = (ItemRefParam)l.value;
|
||||
writer.Write((UInt32)Utils.SwapEndian((UInt32)type7.actorId));
|
||||
writer.Write((Byte)type7.unknown);
|
||||
writer.Write((Byte)type7.slot);
|
||||
writer.Write((Byte)type7.itemPackage);
|
||||
writer.Write((uint)Utils.SwapEndian((uint)type7.actorId));
|
||||
writer.Write((byte)type7.unknown);
|
||||
writer.Write((byte)type7.slot);
|
||||
writer.Write((byte)type7.itemPackage);
|
||||
break;
|
||||
case 0x9: //Two Longs (only storing first one)
|
||||
writer.Write((UInt64)Utils.SwapEndian(((Type9Param)l.value).item1));
|
||||
writer.Write((UInt64)Utils.SwapEndian(((Type9Param)l.value).item2));
|
||||
writer.Write((ulong)Utils.SwapEndian(((Type9Param)l.value).item1));
|
||||
writer.Write((ulong)Utils.SwapEndian(((Type9Param)l.value).item2));
|
||||
break;
|
||||
case 0xC: //Byte
|
||||
writer.Write((Byte)l.value);
|
||||
writer.Write((byte)l.value);
|
||||
break;
|
||||
case 0x1B: //Short?
|
||||
break;
|
||||
@ -334,7 +335,7 @@ namespace Meteor.Map
|
||||
}
|
||||
}
|
||||
|
||||
writer.Write((Byte)0xF);
|
||||
writer.Write((byte)0xF);
|
||||
}
|
||||
|
||||
public static List<LuaParam> CreateLuaParamList(DynValue fromScript)
|
||||
@ -417,7 +418,7 @@ namespace Meteor.Map
|
||||
{
|
||||
luaParams.Add(new LuaParam(0x1, (uint)o));
|
||||
}
|
||||
else if (o is Double)
|
||||
else if (o is double)
|
||||
{
|
||||
if (((double)o) % 1 == 0)
|
||||
luaParams.Add(new LuaParam(0x0, (int)(double)o));
|
||||
@ -481,13 +482,13 @@ namespace Meteor.Map
|
||||
switch (lParams[i].typeID)
|
||||
{
|
||||
case 0x0: //Int32
|
||||
dumpString += String.Format("0x{0:X}", (int)lParams[i].value);
|
||||
dumpString += string.Format("0x{0:X}", (int)lParams[i].value);
|
||||
break;
|
||||
case 0x1: //Int32
|
||||
dumpString += String.Format("0x{0:X}", (uint)lParams[i].value);
|
||||
dumpString += string.Format("0x{0:X}", (uint)lParams[i].value);
|
||||
break;
|
||||
case 0x2: //Null Termed String
|
||||
dumpString += String.Format("\"{0}\"", (string)lParams[i].value);
|
||||
dumpString += string.Format("\"{0}\"", (string)lParams[i].value);
|
||||
break;
|
||||
case 0x3: //Boolean True
|
||||
dumpString += "true";
|
||||
@ -499,25 +500,25 @@ namespace Meteor.Map
|
||||
dumpString += "nil";
|
||||
break;
|
||||
case 0x6: //Actor (By Id)
|
||||
dumpString += String.Format("0x{0:X}", (uint)lParams[i].value);
|
||||
dumpString += string.Format("0x{0:X}", (uint)lParams[i].value);
|
||||
break;
|
||||
case 0x7: //Weird one used for inventory
|
||||
ItemRefParam type7Param = ((ItemRefParam)lParams[i].value);
|
||||
dumpString += String.Format("Type7 Param: (0x{0:X}, 0x{1:X}, 0x{2:X}, 0x{3:X})", type7Param.actorId, type7Param.unknown, type7Param.slot, type7Param.itemPackage);
|
||||
dumpString += string.Format("Type7 Param: (0x{0:X}, 0x{1:X}, 0x{2:X}, 0x{3:X})", type7Param.actorId, type7Param.unknown, type7Param.slot, type7Param.itemPackage);
|
||||
break;
|
||||
case 0x8: //Weird one used for inventory
|
||||
ItemOfferParam itemOfferParam = ((ItemOfferParam)lParams[i].value);
|
||||
dumpString += String.Format("Type8 Param: (0x{0:X}, 0x{1:X}, 0x{2:X}, 0x{3:X}, 0x{4:X}, 0x{5:X}, 0x{6:X})", itemOfferParam.actorId, itemOfferParam.offerSlot, itemOfferParam.offerPackageId, itemOfferParam.unknown1, itemOfferParam.seekSlot, itemOfferParam.seekPackageId, itemOfferParam.unknown2);
|
||||
dumpString += string.Format("Type8 Param: (0x{0:X}, 0x{1:X}, 0x{2:X}, 0x{3:X}, 0x{4:X}, 0x{5:X}, 0x{6:X})", itemOfferParam.actorId, itemOfferParam.offerSlot, itemOfferParam.offerPackageId, itemOfferParam.unknown1, itemOfferParam.seekSlot, itemOfferParam.seekPackageId, itemOfferParam.unknown2);
|
||||
break;
|
||||
case 0x9: //Long (+ 8 bytes ignored)
|
||||
Type9Param type9Param = ((Type9Param)lParams[i].value);
|
||||
dumpString += String.Format("Type9 Param: (0x{0:X}, 0x{1:X})", type9Param.item1, type9Param.item2);
|
||||
dumpString += string.Format("Type9 Param: (0x{0:X}, 0x{1:X})", type9Param.item1, type9Param.item2);
|
||||
break;
|
||||
case 0xC: //Byte
|
||||
dumpString += String.Format("0x{0:X}", (byte)lParams[i].value);
|
||||
dumpString += string.Format("0x{0:X}", (byte)lParams[i].value);
|
||||
break;
|
||||
case 0x1B: //Short?
|
||||
dumpString += String.Format("0x{0:X}", (ushort)lParams[i].value);
|
||||
dumpString += string.Format("0x{0:X}", (ushort)lParams[i].value);
|
||||
break;
|
||||
case 0xF: //End
|
||||
break;
|
||||
|
@ -164,9 +164,12 @@
|
||||
<Compile Include="Actors\Group\Work\PartyWork.cs" />
|
||||
<Compile Include="Actors\Group\Work\RelationWork.cs" />
|
||||
<Compile Include="Actors\Judge\Judge.cs" />
|
||||
<Compile Include="Actors\Quest\Scenario.cs" />
|
||||
<Compile Include="Actors\Quest\PassiveGuildleve.cs" />
|
||||
<Compile Include="Actors\Quest\Quest.cs" />
|
||||
<Compile Include="Actors\StaticActors.cs" />
|
||||
<Compile Include="Actors\World\WorldMaster.cs" />
|
||||
<Compile Include="DataObjects\PassiveGuildleveData.cs" />
|
||||
<Compile Include="DataObjects\GuildleveData.cs" />
|
||||
<Compile Include="DataObjects\Recipe.cs" />
|
||||
<Compile Include="DataObjects\RecipeResolver.cs" />
|
||||
|
@ -27,6 +27,7 @@ using Meteor.Map.dataobjects;
|
||||
|
||||
using Meteor.Common;
|
||||
using Meteor.Map.Actors;
|
||||
using Meteor.Map.DataObjects;
|
||||
|
||||
namespace Meteor.Map
|
||||
{
|
||||
@ -47,12 +48,16 @@ namespace Meteor.Map
|
||||
private static CommandProcessor mCommandProcessor = new CommandProcessor();
|
||||
private static ZoneConnection mWorldConnection = new ZoneConnection();
|
||||
private static WorldManager mWorldManager;
|
||||
private static Dictionary<uint, ItemData> mGamedataItems;
|
||||
private static Dictionary<uint, GuildleveData> mGamedataGuildleves;
|
||||
private static StaticActors mStaticActors;
|
||||
|
||||
private PacketProcessor mProcessor;
|
||||
|
||||
//Game Data
|
||||
private static Dictionary<uint, ItemData> gamedataItems;
|
||||
private static Dictionary<uint, GuildleveData> gamedataGuildleves;
|
||||
private static Dictionary<uint, PassiveGuildleveData> gamedataPassiveGL;
|
||||
private static RecipeResolver gamedataRecipeResolver;
|
||||
|
||||
public Server()
|
||||
{
|
||||
mSelf = this;
|
||||
@ -62,10 +67,14 @@ namespace Meteor.Map
|
||||
{
|
||||
mStaticActors = new StaticActors(STATIC_ACTORS_PATH);
|
||||
|
||||
mGamedataItems = Database.GetItemGamedata();
|
||||
Program.Log.Info("Loaded {0} items.", mGamedataItems.Count);
|
||||
mGamedataGuildleves = Database.GetGuildleveGamedata();
|
||||
Program.Log.Info("Loaded {0} guildleves.", mGamedataGuildleves.Count);
|
||||
gamedataItems = Database.GetItemGamedata();
|
||||
Program.Log.Info("Loaded {0} items.", gamedataItems.Count);
|
||||
gamedataGuildleves = Database.GetGuildleveGamedata();
|
||||
Program.Log.Info("Loaded {0} guildleves.", gamedataGuildleves.Count);
|
||||
gamedataPassiveGL = Database.GetPassiveGuildleveGamedata();
|
||||
Program.Log.Info("Loaded {0} passive (local) guildleves.", gamedataPassiveGL.Count);
|
||||
gamedataRecipeResolver = RecipeResolver.Init();
|
||||
Program.Log.Info("Loaded {0} crafting recipes.", gamedataRecipeResolver.GetNumRecipes());
|
||||
|
||||
mWorldManager = new WorldManager(this);
|
||||
mWorldManager.LoadZoneList();
|
||||
@ -299,7 +308,7 @@ namespace Meteor.Map
|
||||
|
||||
public static Dictionary<uint, ItemData> GetGamedataItems()
|
||||
{
|
||||
return mGamedataItems;
|
||||
return gamedataItems;
|
||||
}
|
||||
|
||||
public static Actor GetStaticActors(uint id)
|
||||
@ -314,19 +323,31 @@ namespace Meteor.Map
|
||||
|
||||
public static ItemData GetItemGamedata(uint id)
|
||||
{
|
||||
if (mGamedataItems.ContainsKey(id))
|
||||
return mGamedataItems[id];
|
||||
if (gamedataItems.ContainsKey(id))
|
||||
return gamedataItems[id];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public static GuildleveData GetGuildleveGamedata(uint id)
|
||||
{
|
||||
if (mGamedataGuildleves.ContainsKey(id))
|
||||
return mGamedataGuildleves[id];
|
||||
if (gamedataGuildleves.ContainsKey(id))
|
||||
return gamedataGuildleves[id];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public static PassiveGuildleveData GetPassiveGLGamedata(uint id)
|
||||
{
|
||||
if (gamedataPassiveGL.ContainsKey(id))
|
||||
return gamedataPassiveGL[id];
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
public static RecipeResolver ResolveRecipe()
|
||||
{
|
||||
return gamedataRecipeResolver;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ namespace Meteor.Map.utils
|
||||
return faceInfo;
|
||||
}
|
||||
|
||||
public static UInt32 GetTribeModel(byte tribe)
|
||||
public static uint GetTribeModel(byte tribe)
|
||||
{
|
||||
switch (tribe)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user