mirror of
https://github.com/mangosfour/server.git
synced 2025-12-17 07:37:03 +00:00
[10050] Implement apply non-trade slot item enchanting at trade complete.
Base at original patch provided by arrai. Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
a248a1a32d
commit
64f959fb82
10 changed files with 438 additions and 183 deletions
|
|
@ -63,9 +63,19 @@ int32 GetSpellMaxDuration(SpellEntry const *spellInfo)
|
|||
|
||||
uint32 GetSpellCastTime(SpellEntry const* spellInfo, Spell const* spell)
|
||||
{
|
||||
// some triggered spells have data only usable for client
|
||||
if (spell && spell->IsTriggeredSpellWithRedundentData())
|
||||
return 0;
|
||||
if (spell)
|
||||
{
|
||||
// some triggered spells have data only usable for client
|
||||
if (spell->IsTriggeredSpellWithRedundentData())
|
||||
return 0;
|
||||
|
||||
// spell targeted to non-trading trade slot item instant at trade success apply
|
||||
if (spell->GetCaster()->GetTypeId()==TYPEID_PLAYER)
|
||||
if (TradeData* my_trade = ((Player*)(spell->GetCaster()))->GetTradeData())
|
||||
if (Item* nonTrade = my_trade->GetTraderData()->GetItem(TRADE_SLOT_NONTRADED))
|
||||
if (nonTrade == spell->m_targets.getItemTarget())
|
||||
return 0;
|
||||
}
|
||||
|
||||
SpellCastTimesEntry const *spellCastTimeEntry = sSpellCastTimesStore.LookupEntry(spellInfo->CastingTimeIndex);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue