Bug fix in event_trade export, exported augments too. Also need to fix overloads

This commit is contained in:
KimLS
2013-05-26 15:56:55 -07:00
parent 850fa5aecc
commit 1e7c5bb9b7
8 changed files with 128 additions and 20 deletions
+61 -1
View File
@@ -73,7 +73,7 @@ void handle_npc_event_trade(QuestInterface *parse, lua_State* L, NPC* npc, Mob *
lua_setfield(L, -2, "item1_attuned");
lua_pushboolean(L, std::stoul(parse->GetVar("item2.attuned." + ident.str())) != 0 ? true : false);
lua_setfield(L, -2, "item1_attuned");
lua_setfield(L, -2, "item2_attuned");
lua_pushboolean(L, std::stoul(parse->GetVar("item3.attuned." + ident.str())) != 0 ? true : false);
lua_setfield(L, -2, "item3_attuned");
@@ -81,6 +81,66 @@ void handle_npc_event_trade(QuestInterface *parse, lua_State* L, NPC* npc, Mob *
lua_pushboolean(L, std::stoul(parse->GetVar("item4.attuned." + ident.str())) != 0 ? true : false);
lua_setfield(L, -2, "item4_attuned");
lua_pushinteger(L, std::stoul(parse->GetVar("item1.augment1." + ident.str())));
lua_setfield(L, -2, "item1_augment1");
lua_pushinteger(L, std::stoul(parse->GetVar("item1.augment2." + ident.str())));
lua_setfield(L, -2, "item1_augment2");
lua_pushinteger(L, std::stoul(parse->GetVar("item1.augment3." + ident.str())));
lua_setfield(L, -2, "item1_augment3");
lua_pushinteger(L, std::stoul(parse->GetVar("item1.augment4." + ident.str())));
lua_setfield(L, -2, "item1_augment4");
lua_pushinteger(L, std::stoul(parse->GetVar("item1.augment5." + ident.str())));
lua_setfield(L, -2, "item1_augment5");
lua_pushinteger(L, std::stoul(parse->GetVar("item2.augment1." + ident.str())));
lua_setfield(L, -2, "item2_augment1");
lua_pushinteger(L, std::stoul(parse->GetVar("item2.augment2." + ident.str())));
lua_setfield(L, -2, "item2_augment2");
lua_pushinteger(L, std::stoul(parse->GetVar("item2.augment3." + ident.str())));
lua_setfield(L, -2, "item2_augment3");
lua_pushinteger(L, std::stoul(parse->GetVar("item2.augment4." + ident.str())));
lua_setfield(L, -2, "item2_augment4");
lua_pushinteger(L, std::stoul(parse->GetVar("item2.augment5." + ident.str())));
lua_setfield(L, -2, "item2_augment5");
lua_pushinteger(L, std::stoul(parse->GetVar("item3.augment1." + ident.str())));
lua_setfield(L, -2, "item3_augment1");
lua_pushinteger(L, std::stoul(parse->GetVar("item3.augment2." + ident.str())));
lua_setfield(L, -2, "item3_augment2");
lua_pushinteger(L, std::stoul(parse->GetVar("item3.augment3." + ident.str())));
lua_setfield(L, -2, "item3_augment3");
lua_pushinteger(L, std::stoul(parse->GetVar("item3.augment4." + ident.str())));
lua_setfield(L, -2, "item3_augment4");
lua_pushinteger(L, std::stoul(parse->GetVar("item3.augment5." + ident.str())));
lua_setfield(L, -2, "item3_augment5");
lua_pushinteger(L, std::stoul(parse->GetVar("item4.augment1." + ident.str())));
lua_setfield(L, -2, "item4_augment1");
lua_pushinteger(L, std::stoul(parse->GetVar("item4.augment2." + ident.str())));
lua_setfield(L, -2, "item4_augment2");
lua_pushinteger(L, std::stoul(parse->GetVar("item4.augment3." + ident.str())));
lua_setfield(L, -2, "item4_augment3");
lua_pushinteger(L, std::stoul(parse->GetVar("item4.augment4." + ident.str())));
lua_setfield(L, -2, "item4_augment4");
lua_pushinteger(L, std::stoul(parse->GetVar("item4.augment5." + ident.str())));
lua_setfield(L, -2, "item4_augment5");
lua_pushinteger(L, std::stoul(parse->GetVar("platinum." + ident.str())));
lua_setfield(L, -2, "platinum");