aboutsummaryrefslogtreecommitdiff
path: root/src/server/shared/Database/Implementation
diff options
context:
space:
mode:
authorSubv <s.v.h21@hotmail.com>2012-12-20 07:00:29 -0800
committerSubv <s.v.h21@hotmail.com>2012-12-20 07:00:29 -0800
commit957571e18c4d6e5874ce1052ae49e4d0d21018be (patch)
tree7c4687f064a203636ce738fbd62e3522b31b38f7 /src/server/shared/Database/Implementation
parent04a3939a23ea7d8a50200eb461215e06d5365332 (diff)
parent04f08d26a72ab29b11fc2aaef65bc54078cc2086 (diff)
Merge pull request #8662 from MrSmite/ItemContainer_1.1
Item Loot Saving
Diffstat (limited to 'src/server/shared/Database/Implementation')
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.cpp9
-rw-r--r--src/server/shared/Database/Implementation/CharacterDatabase.h8
2 files changed, 17 insertions, 0 deletions
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.cpp b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
index 33f0cab5170..3ef94f3aafd 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.cpp
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.cpp
@@ -540,6 +540,15 @@ void CharacterDatabaseConnection::DoPrepareStatements()
PREPARE_STATEMENT(CHAR_DEL_CHAR_ACTION_EXCEPT_SPEC, "DELETE FROM character_action WHERE spec<>? AND guid = ?", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_SEL_CHAR_PET_BY_ENTRY_AND_SLOT, "SELECT id, entry, owner, modelid, level, exp, Reactstate, slot, name, renamed, curhealth, curmana, curhappiness, abdata, savetime, CreatedBySpell, PetType FROM character_pet WHERE owner = ? AND slot = ?", CONNECTION_SYNCH);
+ // Items that hold loot or money
+ PREPARE_STATEMENT(CHAR_SEL_ITEMCONTAINER_ITEMS, "SELECT item_id, item_count, follow_rules, ffa, blocked, counted, under_threshold, needs_quest, rnd_prop, rnd_suffix FROM item_loot_items WHERE container_id = ?", CONNECTION_SYNCH);
+ PREPARE_STATEMENT(CHAR_DEL_ITEMCONTAINER_ITEMS, "DELETE FROM item_loot_items WHERE container_id = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_DEL_ITEMCONTAINER_ITEM, "DELETE FROM item_loot_items WHERE container_id = ? AND item_id = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_INS_ITEMCONTAINER_ITEMS, "INSERT INTO item_loot_items (container_id, item_id, item_count, follow_rules, ffa, blocked, counted, under_threshold, needs_quest, rnd_prop, rnd_suffix) VALUES (?,?,?,?,?,?,?,?,?,?,?)", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_SEL_ITEMCONTAINER_MONEY, "SELECT money FROM item_loot_money WHERE container_id = ?", CONNECTION_SYNCH);
+ PREPARE_STATEMENT(CHAR_DEL_ITEMCONTAINER_MONEY, "DELETE FROM item_loot_money WHERE container_id = ?", CONNECTION_ASYNC);
+ PREPARE_STATEMENT(CHAR_INS_ITEMCONTAINER_MONEY," INSERT INTO item_loot_money (container_id, money) VALUES (?,?)", CONNECTION_ASYNC);
+
// Calendar
PREPARE_STATEMENT(CHAR_REP_CALENDAR_EVENT, "REPLACE INTO calendar_events (id, creator, title, description, type, dungeon, eventtime, flags, time2) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)", CONNECTION_ASYNC);
PREPARE_STATEMENT(CHAR_DEL_CALENDAR_EVENT, "DELETE FROM calendar_events WHERE id = ?", CONNECTION_ASYNC);
diff --git a/src/server/shared/Database/Implementation/CharacterDatabase.h b/src/server/shared/Database/Implementation/CharacterDatabase.h
index 181161978df..d2e69fb0d17 100644
--- a/src/server/shared/Database/Implementation/CharacterDatabase.h
+++ b/src/server/shared/Database/Implementation/CharacterDatabase.h
@@ -505,6 +505,14 @@ enum CharacterDatabaseStatements
CHAR_REP_CALENDAR_INVITE,
CHAR_DEL_CALENDAR_INVITE,
+ CHAR_SEL_ITEMCONTAINER_ITEMS,
+ CHAR_DEL_ITEMCONTAINER_ITEMS,
+ CHAR_DEL_ITEMCONTAINER_ITEM,
+ CHAR_INS_ITEMCONTAINER_ITEMS,
+ CHAR_SEL_ITEMCONTAINER_MONEY,
+ CHAR_DEL_ITEMCONTAINER_MONEY,
+ CHAR_INS_ITEMCONTAINER_MONEY,
+
MAX_CHARACTERDATABASE_STATEMENTS
};