mirror of
https://github.com/EQEmu/Server.git
synced 2026-06-11 11:48:37 +00:00
[Bug Fix] Add locations where melee can be bound outside of a city. (#3887)
* [Bug Fix] Add locations where melee can be bound outside of a city. * new line
This commit is contained in:
+28
-26
@@ -938,10 +938,8 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
snprintf(effect_desc, _EDLEN, "Bind Affinity");
|
||||
#endif
|
||||
if (IsClient())
|
||||
{
|
||||
if(CastToClient()->GetGM() || RuleB(Character, BindAnywhere))
|
||||
{
|
||||
if (IsClient()) {
|
||||
if (CastToClient()->GetGM() || RuleB(Character, BindAnywhere)) {
|
||||
auto action_packet =
|
||||
new EQApplicationPacket(OP_Action, sizeof(Action_Struct));
|
||||
Action_Struct* action = (Action_Struct*) action_packet->pBuffer;
|
||||
@@ -965,34 +963,32 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
cd->hit_heading = action->hit_heading;
|
||||
|
||||
CastToClient()->QueuePacket(action_packet);
|
||||
if(caster && caster->IsClient() && caster != this)
|
||||
|
||||
if (caster && caster->IsClient() && caster != this) {
|
||||
caster->CastToClient()->QueuePacket(action_packet);
|
||||
}
|
||||
|
||||
CastToClient()->QueuePacket(message_packet);
|
||||
if(caster && caster->IsClient() && caster != this)
|
||||
|
||||
if (caster && caster->IsClient() && caster != this) {
|
||||
caster->CastToClient()->QueuePacket(message_packet);
|
||||
}
|
||||
|
||||
CastToClient()->SetBindPoint(spells[spell_id].base_value[i] - 1);
|
||||
Save();
|
||||
safe_delete(action_packet);
|
||||
safe_delete(message_packet);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!zone->CanBind())
|
||||
{
|
||||
} else {
|
||||
if (!zone->CanBind()) {
|
||||
MessageString(Chat::SpellFailure, CANNOT_BIND);
|
||||
break;
|
||||
}
|
||||
if(!zone->IsCity())
|
||||
{
|
||||
if(caster != this)
|
||||
{
|
||||
|
||||
if (!zone->IsCity()) {
|
||||
if (caster != this && !zone->IsSpecialBindLocation(GetPosition())) {
|
||||
MessageString(Chat::SpellFailure, CANNOT_BIND);
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
auto action_packet = new EQApplicationPacket(
|
||||
OP_Action, sizeof(Action_Struct));
|
||||
Action_Struct* action = (Action_Struct*) action_packet->pBuffer;
|
||||
@@ -1016,21 +1012,23 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
cd->hit_heading = action->hit_heading;
|
||||
|
||||
CastToClient()->QueuePacket(action_packet);
|
||||
if(caster->IsClient() && caster != this)
|
||||
|
||||
if (caster->IsClient() && caster != this) {
|
||||
caster->CastToClient()->QueuePacket(action_packet);
|
||||
}
|
||||
|
||||
CastToClient()->QueuePacket(message_packet);
|
||||
if(caster->IsClient() && caster != this)
|
||||
|
||||
if (caster->IsClient() && caster != this) {
|
||||
caster->CastToClient()->QueuePacket(message_packet);
|
||||
}
|
||||
|
||||
CastToClient()->SetBindPoint(spells[spell_id].base_value[i] - 1);
|
||||
Save();
|
||||
safe_delete(action_packet);
|
||||
safe_delete(message_packet);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
auto action_packet =
|
||||
new EQApplicationPacket(OP_Action, sizeof(Action_Struct));
|
||||
Action_Struct* action = (Action_Struct*) action_packet->pBuffer;
|
||||
@@ -1054,13 +1052,17 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
cd->hit_heading = action->hit_heading;
|
||||
|
||||
CastToClient()->QueuePacket(action_packet);
|
||||
if(caster->IsClient() && caster != this)
|
||||
|
||||
if (caster->IsClient() && caster != this) {
|
||||
caster->CastToClient()->QueuePacket(action_packet);
|
||||
}
|
||||
|
||||
CastToClient()->QueuePacket(message_packet);
|
||||
if(caster->IsClient() && caster != this)
|
||||
caster->CastToClient()->QueuePacket(message_packet);
|
||||
|
||||
if (caster->IsClient() && caster != this) {
|
||||
caster->CastToClient()->QueuePacket(message_packet);
|
||||
}
|
||||
|
||||
CastToClient()->SetBindPoint(spells[spell_id].base_value[i] - 1);
|
||||
Save();
|
||||
safe_delete(action_packet);
|
||||
|
||||
Reference in New Issue
Block a user