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:
Michael Cook (mackal)
2016-03-05 16:28:53 -05:00
parent 655d2d47ba
commit 9599501ace
17 changed files with 109 additions and 88 deletions
+24 -21
View File
@@ -707,37 +707,40 @@ void Client::GoToSafeCoords(uint16 zone_id, uint16 instance_id) {
}
void Mob::Gate() {
GoToBind();
void Mob::Gate(uint8 bindnum) {
GoToBind(bindnum);
}
void Client::Gate() {
Mob::Gate();
void Client::Gate(uint8 bindnum) {
Mob::Gate(bindnum);
}
void NPC::Gate() {
void NPC::Gate(uint8 bindnum) {
entity_list.MessageClose_StringID(this, true, 200, MT_Spells, GATES, GetCleanName());
Mob::Gate();
Mob::Gate(bindnum);
}
void Client::SetBindPoint(int to_zone, int to_instance, const glm::vec3& location) {
void Client::SetBindPoint(int bind_num, int to_zone, int to_instance, const glm::vec3 &location)
{
if (bind_num < 0 || bind_num >= 4)
bind_num = 0;
if (to_zone == -1) {
m_pp.binds[0].zoneId = zone->GetZoneID();
m_pp.binds[0].instance_id = (zone->GetInstanceID() != 0 && zone->IsInstancePersistent()) ? zone->GetInstanceID() : 0;
m_pp.binds[0].x = m_Position.x;
m_pp.binds[0].y = m_Position.y;
m_pp.binds[0].z = m_Position.z;
m_pp.binds[bind_num].zoneId = zone->GetZoneID();
m_pp.binds[bind_num].instance_id =
(zone->GetInstanceID() != 0 && zone->IsInstancePersistent()) ? zone->GetInstanceID() : 0;
m_pp.binds[bind_num].x = m_Position.x;
m_pp.binds[bind_num].y = m_Position.y;
m_pp.binds[bind_num].z = m_Position.z;
} else {
m_pp.binds[bind_num].zoneId = to_zone;
m_pp.binds[bind_num].instance_id = to_instance;
m_pp.binds[bind_num].x = location.x;
m_pp.binds[bind_num].y = location.y;
m_pp.binds[bind_num].z = location.z;
}
else {
m_pp.binds[0].zoneId = to_zone;
m_pp.binds[0].instance_id = to_instance;
m_pp.binds[0].x = location.x;
m_pp.binds[0].y = location.y;
m_pp.binds[0].z = location.z;
}
auto regularBindPoint = glm::vec4(m_pp.binds[0].x, m_pp.binds[0].y, m_pp.binds[0].z, 0.0f);
database.SaveCharacterBindPoint(this->CharacterID(), m_pp.binds[0].zoneId, m_pp.binds[0].instance_id, regularBindPoint, 0);
database.SaveCharacterBindPoint(this->CharacterID(), m_pp.binds[bind_num], bind_num);
}
void Client::GoToBind(uint8 bindnum) {