Skip to content
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

Merged

Conversation

Aokromes
Copy link
Member

@Aokromes Aokromes commented Jul 9, 2016

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

if (Creature* teleportTrigger = passenger->SummonTrigger(go->GetPositionX()-60.0f, go->GetPositionY(), go->GetPositionZ()+1.0f, cVeh->GetOrientation(), 1000))
return teleportTrigger;

return NULL;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return nullptr;

@Aokromes Aokromes changed the title Scripts/Wintergrasp: Fix vehicle teleporpter Scripts/Wintergrasp: Fix vehicle teleporter Jul 9, 2016
@Aokromes Aokromes force-pushed the wintergrasp_vehicle_teleporter branch from 66b8ebc to a956047 Compare July 9, 2016 21:25
(go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_ALLIANCE] && passenger->getRaceMask() & RACEMASK_ALLIANCE));
}


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

empty line

{
if (_checkTimer <= diff)
return ((go->GetUInt32Value(GAMEOBJECT_FACTION) == WintergraspFaction[TEAM_HORDE] && passenger->getRaceMask() & RACEMASK_HORDE) ||
Copy link
Member

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 ?

Copy link

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

@SnapperRy SnapperRy merged commit 308a241 into TrinityCore:3.3.5 Oct 4, 2016
Aokromes added a commit to Aokromes/TrinityCore that referenced this pull request Oct 5, 2016
@Aokromes Aokromes deleted the wintergrasp_vehicle_teleporter branch November 4, 2016 16:47
joschiwald pushed a commit that referenced this pull request Mar 5, 2017
By WoWErrorDev, closes #5831.
(cherry picked from commit 308a241)
conan513 pushed a commit to conan513/SingleCore_TC that referenced this pull request Mar 13, 2017
conan513 pushed a commit to conan513/SingleCore_TC that referenced this pull request Apr 16, 2017
Krudor pushed a commit to Krudor/TrinityCore that referenced this pull request Jul 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants