New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts/Wintergrasp: Fix vehicle teleporter #17550
Scripts/Wintergrasp: Fix vehicle teleporter #17550
Conversation
By WoWErrorDev closes TrinityCore#5831
if (Creature* teleportTrigger = passenger->SummonTrigger(go->GetPositionX()-60.0f, go->GetPositionY(), go->GetPositionZ()+1.0f, cVeh->GetOrientation(), 1000)) | ||
return teleportTrigger; | ||
|
||
return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return nullptr;
…to wintergrasp_vehicle_teleporter
66b8ebc
to
a956047
Compare
… bad, choice where you work, and continue there.
…to wintergrasp_vehicle_teleporter
(go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_ALLIANCE] && passenger->getRaceMask() & RACEMASK_ALLIANCE)); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty line
…to wintergrasp_vehicle_teleporter
{ | ||
if (_checkTimer <= diff) | ||
return ((go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_HORDE] && passenger->getRaceMask() & RACEMASK_HORDE) || |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is RaceMask the correct way to get the faction ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After searching in the source, I would guess no. Perhaps better to use
return ((go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_HORDE] && passenger->getFaction() & HORDE) ||
(go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_ALLIANCE] && passenger->getFaction() & ALLIANCE));
but maybe it depends on if the check needs to return a specific value or just a comparison difference (high/low).
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Miscellaneous/SharedDefines.h#L93-L103
vs
https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/game/Miscellaneous/SharedDefines.h#L651-L661
By WoWErrorDev, closes TrinityCore#5831.
By WoWErrorDev, closes TrinityCore#5831. (cherry picked from commit 308a241)
By WoWErrorDev, closes TrinityCore#5831.
By WoWErrorDev, closes TrinityCore#5831. (cherry picked from commit 308a241)
Changes proposed:
Fix wintergrasp vehicle teleporters
Target branch(es): 335/6x
Issues addressed: Closes #5831
Tests performed: (Does it build, tested in-game, etc)
By WoWErrorDev