Fix item clicks being TGBable

This commit is contained in:
Michael Cook (mackal)
2016-07-29 15:14:26 -04:00
parent 239c478f31
commit 2a2ce6da5d
4 changed files with 8 additions and 8 deletions
+4 -4
View File
@@ -1348,7 +1348,7 @@ void Mob::CastedSpellFinished(uint16 spell_id, uint32 target_id, uint16 slot,
}
bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction) {
bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction, uint16 slot) {
/*
The basic types of spells:
@@ -1682,7 +1682,7 @@ bool Mob::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
case ST_Group:
case ST_GroupNoPets:
{
if(IsClient() && CastToClient()->TGB() && IsTGBCompatibleSpell(spell_id)) {
if(IsClient() && CastToClient()->TGB() && IsTGBCompatibleSpell(spell_id) && slot != USE_ITEM_SPELL_SLOT) {
if( (!target) ||
(target->IsNPC() && !(target->GetOwner() && target->GetOwner()->IsClient())) ||
(target->IsCorpse()) )
@@ -1974,7 +1974,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, uint16 slot, uint16
//determine the type of spell target we have
CastAction_type CastAction;
if(!DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction))
if(!DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction, slot))
return(false);
Log.Out(Logs::Detail, Logs::Spells, "Spell %d: target type %d, target %s, AE center %s", spell_id, CastAction, spell_target?spell_target->GetName():"NONE", ae_center?ae_center->GetName():"NONE");
@@ -2370,7 +2370,7 @@ bool Mob::ApplyNextBardPulse(uint16 spell_id, Mob *spell_target, uint16 slot) {
//determine the type of spell target we have
Mob *ae_center = nullptr;
CastAction_type CastAction;
if(!DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction)) {
if(!DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction, slot)) {
Log.Out(Logs::Detail, Logs::Spells, "Bard Song Pulse %d: was unable to determine target. Stopping.", spell_id);
return(false);
}