mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-20 05:01:29 +00:00
Migrate tradeskills and traps [skip ci]
This commit is contained in:
parent
df66c75df2
commit
f5cba5ecab
@ -12150,7 +12150,7 @@ void command_enablerecipe(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (recipe_id > 0) {
|
if (recipe_id > 0) {
|
||||||
success = database.EnableRecipe(recipe_id);
|
success = content_db.EnableRecipe(recipe_id);
|
||||||
if (success) {
|
if (success) {
|
||||||
c->Message(Chat::White, "Recipe enabled.");
|
c->Message(Chat::White, "Recipe enabled.");
|
||||||
}
|
}
|
||||||
@ -12177,7 +12177,7 @@ void command_disablerecipe(Client *c, const Seperator *sep)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (recipe_id > 0) {
|
if (recipe_id > 0) {
|
||||||
success = database.DisableRecipe(recipe_id);
|
success = content_db.DisableRecipe(recipe_id);
|
||||||
if (success) {
|
if (success) {
|
||||||
c->Message(Chat::White, "Recipe disabled.");
|
c->Message(Chat::White, "Recipe disabled.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3158,7 +3158,7 @@ bool QuestManager::EnableRecipe(uint32 recipe_id)
|
|||||||
{
|
{
|
||||||
bool success = false;
|
bool success = false;
|
||||||
if (recipe_id > 0)
|
if (recipe_id > 0)
|
||||||
success = database.EnableRecipe(recipe_id);
|
success = content_db.EnableRecipe(recipe_id);
|
||||||
return (success);
|
return (success);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3166,7 +3166,7 @@ bool QuestManager::DisableRecipe(uint32 recipe_id)
|
|||||||
{
|
{
|
||||||
bool success = false;
|
bool success = false;
|
||||||
if (recipe_id > 0)
|
if (recipe_id > 0)
|
||||||
success = database.DisableRecipe(recipe_id);
|
success = content_db.DisableRecipe(recipe_id);
|
||||||
return (success);
|
return (success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -336,7 +336,7 @@ void Object::HandleCombine(Client* user, const NewCombine_Struct* in_combine, Ob
|
|||||||
}
|
}
|
||||||
|
|
||||||
DBTradeskillRecipe_Struct spec;
|
DBTradeskillRecipe_Struct spec;
|
||||||
if (!database.GetTradeRecipe(container, c_type, some_id, user->CharacterID(), &spec)) {
|
if (!content_db.GetTradeRecipe(container, c_type, some_id, user->CharacterID(), &spec)) {
|
||||||
user->MessageString(Chat::Emote,TRADESKILL_NOCOMBINE);
|
user->MessageString(Chat::Emote,TRADESKILL_NOCOMBINE);
|
||||||
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
auto outapp = new EQApplicationPacket(OP_TradeSkillCombine, 0);
|
||||||
user->QueuePacket(outapp);
|
user->QueuePacket(outapp);
|
||||||
@ -489,7 +489,7 @@ void Object::HandleAutoCombine(Client* user, const RecipeAutoCombine_Struct* rac
|
|||||||
"FROM tradeskill_recipe_entries AS tre "
|
"FROM tradeskill_recipe_entries AS tre "
|
||||||
"WHERE tre.componentcount > 0 AND tre.recipe_id = %u",
|
"WHERE tre.componentcount > 0 AND tre.recipe_id = %u",
|
||||||
rac->recipe_id);
|
rac->recipe_id);
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
user->QueuePacket(outapp);
|
user->QueuePacket(outapp);
|
||||||
safe_delete(outapp);
|
safe_delete(outapp);
|
||||||
@ -706,7 +706,7 @@ EQEmu::skills::SkillType Object::TypeToSkill(uint32 type)
|
|||||||
|
|
||||||
void Client::TradeskillSearchResults(const std::string &query, unsigned long objtype, unsigned long someid) {
|
void Client::TradeskillSearchResults(const std::string &query, unsigned long objtype, unsigned long someid) {
|
||||||
|
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -759,7 +759,7 @@ void Client::SendTradeskillDetails(uint32 recipe_id) {
|
|||||||
"LEFT JOIN items AS i ON tre.item_id = i.id "
|
"LEFT JOIN items AS i ON tre.item_id = i.id "
|
||||||
"WHERE tre.componentcount > 0 AND tre.recipe_id = %u",
|
"WHERE tre.componentcount > 0 AND tre.recipe_id = %u",
|
||||||
recipe_id);
|
recipe_id);
|
||||||
auto results = database.QueryDatabase(query);
|
auto results = content_db.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1427,7 +1427,10 @@ void Client::LearnRecipe(uint32 recipeID)
|
|||||||
"FROM char_recipe_list WHERE char_id = %u) AS crl "
|
"FROM char_recipe_list WHERE char_id = %u) AS crl "
|
||||||
"ON tr.id = crl.recipe_id "
|
"ON tr.id = crl.recipe_id "
|
||||||
"WHERE tr.id = %u ;", CharacterID(), recipeID);
|
"WHERE tr.id = %u ;", CharacterID(), recipeID);
|
||||||
auto results = database.QueryDatabase(query);
|
|
||||||
|
// TODO: BOUNDARY REWRITE
|
||||||
|
|
||||||
|
auto results = database.QueryDatabase(query);
|
||||||
if (!results.Success()) {
|
if (!results.Success()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -557,6 +557,6 @@ void Trap::UpdateTrap(bool respawn, bool repopnow)
|
|||||||
charid = 0;
|
charid = 0;
|
||||||
if (respawn)
|
if (respawn)
|
||||||
{
|
{
|
||||||
database.SetTrapData(this, repopnow);
|
content_db.SetTrapData(this, repopnow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -956,7 +956,7 @@ bool Zone::Init(bool iStaticZone) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
LogInfo("Loading traps");
|
LogInfo("Loading traps");
|
||||||
if (!database.LoadTraps(short_name, GetInstanceVersion()))
|
if (!content_db.LoadTraps(short_name, GetInstanceVersion()))
|
||||||
{
|
{
|
||||||
LogError("Loading traps failed");
|
LogError("Loading traps failed");
|
||||||
return false;
|
return false;
|
||||||
@ -1042,7 +1042,7 @@ void Zone::ReloadStaticData() {
|
|||||||
|
|
||||||
LogInfo("Reloading traps");
|
LogInfo("Reloading traps");
|
||||||
entity_list.RemoveAllTraps();
|
entity_list.RemoveAllTraps();
|
||||||
if (!database.LoadTraps(GetShortName(), GetInstanceVersion()))
|
if (!content_db.LoadTraps(GetShortName(), GetInstanceVersion()))
|
||||||
{
|
{
|
||||||
LogError("Reloading traps failed");
|
LogError("Reloading traps failed");
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user