-
Notifications
You must be signed in to change notification settings - Fork 59
added cfpve.cpp #143
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
base: 3.3.5-cfpve
Are you sure you want to change the base?
added cfpve.cpp #143
Conversation
Note to self: create a branch and change target branch |
Sorry for my ignorance but im not sure what your saying hahaah |
Is the original faction ever restored ? |
It doesnt... I forgot about that meh |
imho this must be merged into main project. |
#include "ScriptMgr.h" enum MiscCrossFactionPVE class CfPlayerScript : public PlayerScript
private:
}; void AddSC_cfpve() |
This is the best I can do for now, if someone wants to help i will accept it, just trying to contribute the best I can, I have added the function to reset faction |
CfPlayerScript() : PlayerScript("CfPlayerScript") {} | ||
|
||
// Called when a player enters the world (logs in or teleports) | ||
void OnLogin(Player* player, bool firstLogin) override |
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.
Change bool firstlogin to bool /* firstlogin */
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.
added
You added the same file twice. |
|
||
private: | ||
// Store the original faction in a map | ||
std::unordered_map<uint64, uint32> originalFactionMap; |
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.
This container is not thread-safe and I'm pretty sure OnUpdateZone() can be called by multiple maps at the same time, meaning it will cause race conditions.
Guys, seeing that it has BG areas such as Warsong Gulch and Arathi Basin, would this be suitable for a Crossfaction Battlegrounds? |
closes #30265 by malcrom
You can simply just do this to restore to player's original faction without storing it You also need to consider pet's faction
If I were you, I will use GetTeamIdInInstance() to play with faction setup instead |
closes #30372 by CraftedRO
closes #30258 by malcrom
it's bad to push things on late night without triple checking text.
…yers, Hellcallers, and Xavaric closes #30260 by malcrom
closes #30373 by CraftedRO
… lookups when building SMSG_UPDATE_OBJECT (cherry picked from commit 38a209276d9a6b3fb5e657711894a1b696933c59)
…n map changes (cherry picked from commit f6c37f6791f1a28f5a077f251ec60a541cf0284f)
…nu_option missed rows
closes #30395 by CraftedRO
closes #30396 by durotar
updates #15220 by sirikfoll
closes #30394 by CraftedRO
closes #30403 by CraftedRO
by malcrom closes #30404
…rom spell effect basepoints (#30908)
…T_ANY_PRIVATE_OBJECT
closes #30911 by Jonne733
closes #30912 by Jonne733
closes #30904 by offl
closes #30922 by offl
…TTR1_DISMISS_PET (#30928)
…ut inside instance without a group (#30982)
Closes #20972 Closes #30747
…fter combat Closes #28797 Closes #30739
Target Branch(es):
335
Issues Addressed:
This update addresses issues related to PVE content when cross-faction configurations are enabled. Specifically, it resolves problems encountered when cross-faction groups participate in dungeons or raids with faction-specific mechanics or creature flags.
Example: In the Icecrown Citadel (ICC) raid, the first player to enter the raid determines the faction alignment for the raid. This can lead to complications such as:
The Gunship Battle becoming problematic, as the enemy faction won't be able to use the cannons.
Mobs that should be friendly becoming enemies and vice versa.
This script ensures that all players have a hidden faction mask that matches the raid leader’s faction. This change prevents faction-related issues during PVE encounters. The script can be extended to handle additional PVE encounters or battlegrounds, which is useful if using NPC bots.
Tests Performed:
The script has been tested and functions as intended.