diff options
author | Muhaha <none@none> | 2009-02-06 11:25:04 +0100 |
---|---|---|
committer | Muhaha <none@none> | 2009-02-06 11:25:04 +0100 |
commit | 358d1bb14e1dee62e8d97b0ed75e251dfabe5603 (patch) | |
tree | 6c186c19cc1e3193234a6232da8a5415f1ce2c07 /src | |
parent | e0b3d67c1e32fd1aca6d39fa99dc952ff04fbc90 (diff) |
Now correct patch version: Use spell_loot_table for item creating in case SPELL_EFFECT_CREATE_ITEM_2 (157) and itemType==0. Author: VladimirMangos
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/LootMgr.cpp | 4 | ||||
-rw-r--r-- | src/game/Player.cpp | 12 | ||||
-rw-r--r-- | src/game/Player.h | 4 | ||||
-rw-r--r-- | src/game/SpellEffects.cpp | 3 | ||||
-rw-r--r-- | src/shared/revision_nr.h | 2 |
5 files changed, 13 insertions, 12 deletions
diff --git a/src/game/LootMgr.cpp b/src/game/LootMgr.cpp index 452efe4e5da..53492522afe 100644 --- a/src/game/LootMgr.cpp +++ b/src/game/LootMgr.cpp @@ -1281,9 +1281,9 @@ void LoadLootTemplates_Spell() if(!ids_set.count(spell_id)) { - // not report about not trainable spells (optionally supported by DB) + // not report about not trainable spells (optionally supported by DB) except with SPELL_ATTR_EX2_UNK14 (clams) // 61756 (Northrend Inscription Research (FAST QA VERSION) for example - if(spellInfo->Attributes & SPELL_ATTR_UNK5) + if ((spellInfo->Attributes & SPELL_ATTR_UNK5) || (spellInfo->AttributesEx2 & SPELL_ATTR_EX2_UNK14)) LootTemplates_Spell.ReportNotExistedId(spell_id); } else diff --git a/src/game/Player.cpp b/src/game/Player.cpp index d992bfd4a65..734aa7424b3 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -20232,7 +20232,7 @@ void Player::InitRunes() SetFloatValue(PLAYER_RUNE_REGEN_1 + i, 0.1f); } -bool Player::AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store) +void Player::AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store) { Loot loot; loot.FillLoot (loot_id,store,this); @@ -20247,10 +20247,12 @@ bool Player::AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore if( msg != EQUIP_ERR_OK && bag != NULL_BAG) msg = CanStoreNewItem( NULL_BAG, NULL_SLOT,dest,lootItem->itemid,lootItem->count); if(msg != EQUIP_ERR_OK) - return; - - if(Item* pItem = StoreNewItem (dest,lootItem->itemid,true,lootItem->randomPropertyId)) - SendNewItem(pItem, lootItem->count, true, true); + { + SendEquipError( msg, NULL, NULL ); + return + } + Item* pItem = StoreNewItem (dest,lootItem->itemid,true,lootItem->randomPropertyId); + SendNewItem(pItem, lootItem->count, true, false); } uint32 Player::CalculateTalentsPoints() const diff --git a/src/game/Player.h b/src/game/Player.h index 142910b8db1..eeac9ca53f0 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1114,8 +1114,8 @@ class TRINITY_DLL_SPEC Player : public Unit Item* EquipItem( uint16 pos, Item *pItem, bool update ); void AutoUnequipOffhandIfNeed(); bool StoreNewItemInBestSlots(uint32 item_id, uint32 item_count); - bool AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store); - bool AutoStoreLootItem(uint32 loot_id, LootStore const& store) { return AutoStoreLootItem(NULL_BAG,NULL_SLOT,loot_id,store); } + void AutoStoreLootItem(uint8 bag, uint8 slot, uint32 loot_id, LootStore const& store); + void AutoStoreLootItem(uint32 loot_id, LootStore const& store) { AutoStoreLootItem(NULL_BAG,NULL_SLOT,loot_id,store); } uint8 _CanTakeMoreSimilarItems(uint32 entry, uint32 count, Item* pItem, uint32* no_space_count = NULL) const; uint8 _CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec& dest, uint32 entry, uint32 count, Item *pItem = NULL, bool swap = false, uint32* no_space_count = NULL ) const; diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 2827a777759..d4e131ae37e 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2738,8 +2738,7 @@ void Spell::EffectCreateItem2(uint32 i) return; // create some random items - if(!((Player*)m_caster)->AutoStoreLootItem(m_spellInfo->Id,LootTemplates_Spell)) - player->SendEquipError( msg, NULL, NULL ); + ((Player*)m_caster)->AutoStoreLootItem(m_spellInfo->Id,LootTemplates_Spell); return; } DoCreateItem(i,m_spellInfo->EffectItemType[i]); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 471483d106e..039ee980c15 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7232" + #define REVISION_NR "7234" #endif // __REVISION_NR_H__ |