mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-16 22:58:34 +00:00
Implement extra bind points (secondary recall)
For SE_Gate, base2 is which bind to use (starting at 1)
For SE_BindAffinity, base1 is which bind to set (starting at 1)
For SE_GateCastersBindpoint, base1 is which bind to use (starting at 1)
here was actually no spells that don't send to the main bind,
but it uses a base1 of 1 which matches with SE_Gate
This also doesn't break anything
The quest stuff for now hasn't been updated to be able to make use of the extra binds
There are a total of 5 bind points, with the 5th being your starting city
This commit is contained in:
+15
-12
@@ -499,7 +499,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
|
||||
break;
|
||||
}
|
||||
case SE_GateCastersBindpoint: //Shin: Used on Teleport Bind.
|
||||
case SE_GateCastersBindpoint: // Used on Teleport Bind.
|
||||
case SE_Teleport: // gates, rings, circles, etc
|
||||
case SE_Teleport2:
|
||||
{
|
||||
@@ -532,13 +532,16 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
}
|
||||
|
||||
if (effect == SE_GateCastersBindpoint && caster->IsClient())
|
||||
{ //Shin: Teleport Bind uses caster's bind point
|
||||
x = caster->CastToClient()->GetBindX();
|
||||
y = caster->CastToClient()->GetBindY();
|
||||
z = caster->CastToClient()->GetBindZ();
|
||||
heading = caster->CastToClient()->GetBindHeading();
|
||||
{ // Teleport Bind uses caster's bind point
|
||||
int index = spells[spell_id].base[i] - 1;
|
||||
if (index < 0 || index > 4)
|
||||
index = 0;
|
||||
x = caster->CastToClient()->GetBindX(index);
|
||||
y = caster->CastToClient()->GetBindY(index);
|
||||
z = caster->CastToClient()->GetBindZ(index);
|
||||
heading = caster->CastToClient()->GetBindHeading(index);
|
||||
//target_zone = caster->CastToClient()->GetBindZoneId(); target_zone doesn't work due to const char
|
||||
CastToClient()->MovePC(caster->CastToClient()->GetBindZoneID(), 0, x, y, z, heading);
|
||||
CastToClient()->MovePC(caster->CastToClient()->GetBindZoneID(index), 0, x, y, z, heading);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -917,7 +920,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if(caster->IsClient() && caster != this)
|
||||
caster->CastToClient()->QueuePacket(message_packet);
|
||||
|
||||
CastToClient()->SetBindPoint();
|
||||
CastToClient()->SetBindPoint(spells[spell_id].base[i] - 1);
|
||||
Save();
|
||||
safe_delete(action_packet);
|
||||
safe_delete(message_packet);
|
||||
@@ -966,7 +969,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if(caster->IsClient() && caster != this)
|
||||
caster->CastToClient()->QueuePacket(message_packet);
|
||||
|
||||
CastToClient()->SetBindPoint();
|
||||
CastToClient()->SetBindPoint(spells[spell_id].base[i] - 1);
|
||||
Save();
|
||||
safe_delete(action_packet);
|
||||
safe_delete(message_packet);
|
||||
@@ -1002,7 +1005,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if(caster->IsClient() && caster != this)
|
||||
caster->CastToClient()->QueuePacket(message_packet);
|
||||
|
||||
CastToClient()->SetBindPoint();
|
||||
CastToClient()->SetBindPoint(spells[spell_id].base[i] - 1);
|
||||
Save();
|
||||
safe_delete(action_packet);
|
||||
safe_delete(message_packet);
|
||||
@@ -1012,7 +1015,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
break;
|
||||
}
|
||||
|
||||
case SE_Gate: //TO DO: Add support for secondary and tertiary gate abilities (base2)
|
||||
case SE_Gate:
|
||||
{
|
||||
#ifdef SPELL_EFFECT_SPAM
|
||||
snprintf(effect_desc, _EDLEN, "Gate");
|
||||
@@ -1020,7 +1023,7 @@ bool Mob::SpellEffect(Mob* caster, uint16 spell_id, float partial, int level_ove
|
||||
if(!spellbonuses.AntiGate){
|
||||
|
||||
if(zone->random.Roll(effect_value))
|
||||
Gate();
|
||||
Gate(spells[spell_id].base2[i] - 1);
|
||||
else
|
||||
caster->Message_StringID(MT_SpellFailure,GATE_FAIL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user