aboutsummaryrefslogtreecommitdiff
path: root/src/game/Item.cpp
AgeCommit message (Collapse)Author
2010-06-04HIGHLY EXPERIMENTAL - USE AT YOUR OWN RISKRat
implemented Condition System all systems should work like before after applying the sql converter you won't be able to apply any Updatepacks (<=up30) so do updates before this this revesion is not threated as stable! --HG-- branch : trunk
2010-05-31Fix exploit with swaping already looted items.Trazom62
Patch by Vladimir from idea of Zhenya. Fixes issue #702. --HG-- branch : trunk
2010-05-05Use DELETE + INSERT statement wrapped in a transaction in ↵Machiavelli
Item::SaveRefundDataToDB() --HG-- branch : trunk
2010-05-04Add support to set RandomProperty / RandomSuffix to -1 in item_templateSpp
--HG-- branch : trunk
2010-04-30Clean up in item refund related code.Machiavelli
--HG-- branch : trunk
2010-04-28Fix item vendor refund for stackable items.Machiavelli
--HG-- branch : trunk
2010-04-14Drop not needed table 'item_text', add new column 'text' in table ↵n0n4m3
'item_instance'. Original patch by Vladimir. --HG-- branch : trunk
2010-04-11Fix Auth on server also some fixes and cleanups. Big thx to TOM_RUS.n0n4m3
--HG-- branch : trunk
2010-04-07Code Style (game + scripts only):Spp
">=" --> " >= " (when needed) " >=" --> " >=" ">= " --> ">= " "<=" --> " <= " (when needed) " <=" --> " <=" "<= " --> "<= " " ==" --> " ==" "== " --> "== " --HG-- branch : trunk
2010-04-07Code Style (game + scripts only):Spp
"==" --> " == " (when needed) --HG-- branch : trunk
2010-04-07Code style (game + scripts only):Spp
"( " --> "(" " )" --> ")" --HG-- branch : trunk
2010-04-07Code Style: Remove trailing spacesSpp
--HG-- branch : trunk
2010-04-07Code Style: tab to spacesSpp
--HG-- branch : trunk
2010-04-05* Backed out changeset 44ff24439269Brian
* We will implement this in a generic way using the conditions system --HG-- branch : trunk
2010-04-05Add option maxPercentHealth to item_required_target to allow setting health ↵malcromdev@gmail.com>
percentage a target must be at before item use on item_required_target is allowed. This will allow better scripting of quest item use on some creatures. --HG-- branch : trunk
2010-03-21Fix compilation error in previous commit.Trazom62
--HG-- branch : trunk
2010-03-21Add some more function calls to remove refund referenced from player's ↵Machiavelli
m_refundableItems, preventing the triggering of an assert in _saveInventory. --HG-- branch : trunk
2010-03-20Memory optimization by making m_refundableItems a std::set<uint64>. Also fix ↵Machiavelli
a crash caused by invalid iterator in Player::_SaveInventory(). This should fix the last of the item save related crashes. --HG-- branch : trunk
2010-03-20Make sure a to be traded item ends up in the item update queue for the ↵Machiavelli
correct player. --HG-- branch : trunk
2010-03-20Item system updateMachiavelli
- Set ITEM_FIELD_CREATE_PLAYED_TIME to 0 in Item::Create, should fix crash described in issue 1199 - Change some function calls so on Player::_saveInventory the core doesn't have to check for existance of item anymore when iterating over m_refundableItems. The loop will now only update played time, removal of items from this set is done in other functions. - Cleanup in affected functions. --HG-- branch : trunk
2010-03-18Store alternate currency spent on an item by Item ExtendedCost entry instead ↵Machiavelli
of honorPts/arenaPts/items seperately. Thanks to Opterman for the idea. --HG-- branch : trunk
2010-03-18Implement vendor item refund system.Machiavelli
For info about this system, see: hxxp://us.blizzard.com/support/article.xml?locale=en_US&articleId=27351 Thanks to: - Opterman, Malcrom, Xanadu + anonymous colleagues for aiding research on packet structure - Aokromes and Svannon for testing --HG-- branch : trunk
2010-03-16Overload Item::SetState correctly in Item::SetItemRandomProperties.Machiavelli
Fixes issue #1126 --HG-- branch : trunk
2010-03-16- Overload Item::SetState with player argument where possible to ensure ↵Machiavelli
updated data is saved to DB properly. - Alter Item::SetEnchantmentDuration function, add parameter Player* because GetOwner() cannot be called in the function due to hashtable locking in the SaveAllPlayers process. - Remove a sanity check prior to Item::AddToUpdateQueueOf, so assertions can detect whenever a higher level function was not called properly. Please report any crashes related to these assertions to get them resolved asap. --HG-- branch : trunk
2010-03-15Don't call Item::AddToUpdateQueueOf if no player is specified as parameter ↵Machiavelli
for Item::SetState, since in this case, only data stored in the item_instance table is altered, not that of character_inventory. --HG-- branch : trunk
2010-03-15Fix issue with .save or .saveall where either the core would freeze, or ↵Machiavelli
items would not be saved to the DB properly. Fixes issue #381 Fixes issue #477 --HG-- branch : trunk
2010-03-10Minor code style cleanupMachiavelli
--HG-- branch : trunk
2010-03-10Use "REPLACE INTO" instead of "DELETE" + "INSERT INTO" in Item::SaveToDB ↵Machiavelli
call to fix a cause of items randomly disappearing (issue 925). Note: due to the hierarchy of the function calls, it's not possible to use DB transactions in this function. --HG-- branch : trunk
2010-02-15*Backout some WTF fixes. Do things correctly, or do not touch them at all...QAston
*Really fix windows build. --HG-- branch : trunk
2010-02-14* Core switch to client 3.3.2 (11403)Brian
* Credits (in no particular order) to: * n0n4m3, raczman, manuel, Spp, Malcrom, Teacher, QAston, Tartalo, * thenecromancer, Xanadu, Trazom, Zor, kiper * Additional credits to: * TOM_RUS and NoFantasy from MaNGOS * Thanks for testing Aokromes and XTElite1 * SoTA still needs some work, but is very playable (huge thanks to raczman and * kiper) * To upgrade, you need to apply all SQL from sql/updates/3.2.2a_old from the * last rev you are on * and then apply all SQL from sql/updates/3.3.2_old to char / realmd / world * DBs * Known problem with guild banks. --HG-- branch : trunk
2010-02-05Yet more cleanup, mostly in the script system. This should conclude the ↵Xanadu
script integration into core. --HG-- branch : trunk
2010-02-03*Move object's field\visibility update functions to object from accessorsilver1ce
removed useless SendUpdateObjectToAllExcept - anyway fields will be updated, there is no sense to force update them --HG-- branch : trunk
2010-01-30Remove unnecesary item enchants checksSpp
By Az@zel Closes issue #382 --HG-- branch : trunk
2010-01-23Implement QueryResult_AutoPtr type which is ACE's reference counted ↵Anubisss
auto_ptr(ACE_Refcounted_Auto_Ptr) for QueryResult pointers. Use this auto_ptr for every DB queries(except QueryNamedResult yet). This patch guarantees NO memory leaks from QueryResult pointers. Thanks to raczman for the idea and for the helping to make this patch. --HG-- branch : trunk
2010-01-19*Integrate Script system to CoreRat
-added ScriptMgr for loading scripts -removed bindings -moved script system to src/game -moved scripts to src/scripts -VC project files updated -cmakes updated (not 100% done yet) NOTE to Devs: -file locations changed -precompiled renamed to ScriptedPch -ecsort_ai renamed to ScriptedEscortAI -follower_ai renamed to ScriptedFollowerAI -guard_ai renamed to ScriptedGuardAI -simple_ai renamed to ScriptedSimpleAI -sc_creature renamed to ScriptedCreature -sc_gossip renamed to ScriptedGossip -sc_instance renamed to ScriptedInstance *use the new headers in scripts, thank you NOTE to ALL: cmake not fully tested, please report any errors with it could make creashes, incompability USE AT YOUR OWN RISK before further tests!! --HG-- branch : trunk
2010-01-16Updated copyright for new year.n0n4m3
--HG-- branch : trunk
2009-12-26Fixed Mana Gems, implement SPELL_EFFECT_CREATE_MANA_GEM and revert prev. ↵n0n4m3
commit... --HG-- branch : trunk
2009-12-26Fixed items Mysterious Egg, Disgusting Jar (need db support).n0n4m3
--HG-- branch : trunk
2009-12-21* Add support for RewSpellCast=-1. If -1 remove all auras applied to player atBrian
* quest start. * Patch by Kudlaty -- THANK YOU! --HG-- branch : trunk
2009-12-18*Cleanup, proper indentation, and remove some wrong/irrelevant comments ↵maximius
copied from custom patches.. --HG-- branch : trunk
2009-12-17Update InstanceSaveMgr for new instance systemn0n4m3
--HG-- branch : trunk
2009-12-13Check of required skill value and level in Item enchants, by azazel. Closes #512spp
* Added some cosmetic changes to the original patch --HG-- branch : trunk
2009-10-29Fix exploit with using fist weapon without that skill. Patch by _krzKudlaty
--HG-- branch : trunk
2009-10-17*Massive cleanup redux.maximius
--HG-- branch : trunk
2009-10-17*Backed out changeset 3be01fb200a5maximius
--HG-- branch : trunk
2009-10-17*Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and ↵maximius
some other cleanups by hand) *Fix a possible crash in Spell::DoAllEffectOnTarget --HG-- branch : trunk
2009-08-20*Fix build.megamage
--HG-- branch : trunk
2009-08-20*Fix a crash caused by itemexpire.megamage
--HG-- branch : trunk
2009-08-16*Remove hack in Brain Freeze code.QAston
*Update Improved Mend Pet to 3.1.3. --HG-- branch : trunk
2009-08-15*Fix a crash caused by ItemExpire though the reason is unknown.megamage
--HG-- branch : trunk