mirror of
https://github.com/EQEmu/Server.git
synced 2025-12-18 19:41:30 +00:00
Fix item clicks being TGBable
This commit is contained in:
parent
239c478f31
commit
2a2ce6da5d
@ -6084,7 +6084,7 @@ bool Bot::IsImmuneToSpell(uint16 spell_id, Mob *caster) {
|
|||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Bot::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction) {
|
bool Bot::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction, uint16 slot) {
|
||||||
bool Result = false;
|
bool Result = false;
|
||||||
SpellTargetType targetType = spells[spell_id].targettype;
|
SpellTargetType targetType = spells[spell_id].targettype;
|
||||||
if(targetType == ST_GroupClientAndPet) {
|
if(targetType == ST_GroupClientAndPet) {
|
||||||
@ -6093,7 +6093,7 @@ bool Bot::DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_ce
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Result = Mob::DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction);
|
Result = Mob::DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction, slot);
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -378,7 +378,7 @@ public:
|
|||||||
uint32 item_slot = 0xFFFFFFFF, int16 *resist_adjust = nullptr, uint32 aa_id = 0);
|
uint32 item_slot = 0xFFFFFFFF, int16 *resist_adjust = nullptr, uint32 aa_id = 0);
|
||||||
virtual bool SpellOnTarget(uint16 spell_id, Mob* spelltar);
|
virtual bool SpellOnTarget(uint16 spell_id, Mob* spelltar);
|
||||||
virtual bool IsImmuneToSpell(uint16 spell_id, Mob *caster);
|
virtual bool IsImmuneToSpell(uint16 spell_id, Mob *caster);
|
||||||
virtual bool DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction);
|
virtual bool DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center, CastAction_type &CastAction, uint16 slot);
|
||||||
virtual bool DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot = USE_ITEM_SPELL_SLOT, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, uint32 aa_id = 0);
|
virtual bool DoCastSpell(uint16 spell_id, uint16 target_id, uint16 slot = USE_ITEM_SPELL_SLOT, int32 casttime = -1, int32 mana_cost = -1, uint32* oSpellWillFinish = 0, uint32 item_slot = 0xFFFFFFFF, uint32 aa_id = 0);
|
||||||
|
|
||||||
// Bot Equipment & Inventory Class Methods
|
// Bot Equipment & Inventory Class Methods
|
||||||
|
|||||||
@ -264,7 +264,7 @@ public:
|
|||||||
bool use_resist_adjust = false, int16 resist_adjust = 0, bool isproc = false, int level_override = -1);
|
bool use_resist_adjust = false, int16 resist_adjust = 0, bool isproc = false, int level_override = -1);
|
||||||
virtual bool SpellEffect(Mob* caster, uint16 spell_id, float partial = 100, int level_override = -1);
|
virtual bool SpellEffect(Mob* caster, uint16 spell_id, float partial = 100, int level_override = -1);
|
||||||
virtual bool DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center,
|
virtual bool DetermineSpellTargets(uint16 spell_id, Mob *&spell_target, Mob *&ae_center,
|
||||||
CastAction_type &CastAction);
|
CastAction_type &CastAction, uint16 slot);
|
||||||
virtual bool CheckFizzle(uint16 spell_id);
|
virtual bool CheckFizzle(uint16 spell_id);
|
||||||
virtual bool CheckSpellLevelRestriction(uint16 spell_id);
|
virtual bool CheckSpellLevelRestriction(uint16 spell_id);
|
||||||
virtual bool IsImmuneToSpell(uint16 spell_id, Mob *caster);
|
virtual bool IsImmuneToSpell(uint16 spell_id, Mob *caster);
|
||||||
|
|||||||
@ -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:
|
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_Group:
|
||||||
case ST_GroupNoPets:
|
case ST_GroupNoPets:
|
||||||
{
|
{
|
||||||
if(IsClient() && CastToClient()->TGB() && IsTGBCompatibleSpell(spell_id)) {
|
if(IsClient() && CastToClient()->TGB() && IsTGBCompatibleSpell(spell_id) && slot != USE_ITEM_SPELL_SLOT) {
|
||||||
if( (!target) ||
|
if( (!target) ||
|
||||||
(target->IsNPC() && !(target->GetOwner() && target->GetOwner()->IsClient())) ||
|
(target->IsNPC() && !(target->GetOwner() && target->GetOwner()->IsClient())) ||
|
||||||
(target->IsCorpse()) )
|
(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
|
//determine the type of spell target we have
|
||||||
CastAction_type CastAction;
|
CastAction_type CastAction;
|
||||||
if(!DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction))
|
if(!DetermineSpellTargets(spell_id, spell_target, ae_center, CastAction, slot))
|
||||||
return(false);
|
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");
|
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
|
//determine the type of spell target we have
|
||||||
Mob *ae_center = nullptr;
|
Mob *ae_center = nullptr;
|
||||||
CastAction_type CastAction;
|
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);
|
Log.Out(Logs::Detail, Logs::Spells, "Bard Song Pulse %d: was unable to determine target. Stopping.", spell_id);
|
||||||
return(false);
|
return(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user