-
Notifications
You must be signed in to change notification settings - Fork 59
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
added cfpve.cpp #143
Open
urwifemykids
wants to merge
157
commits into
TrinityCore:3.3.5-cfpve
Choose a base branch
from
urwifemykids:cfpve
base: 3.3.5-cfpve
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
added cfpve.cpp #143
Changes from 5 commits
Commits
Show all changes
157 commits
Select commit
Hold shift + click to select a range
c2b4831
added cfpve.cpp
235c7d7
Add files via upload
urwifemykids e49135c
Add files via upload
urwifemykids c5c4755
Update cfpve.cpp
urwifemykids 16996b1
Merge branch 'TrinityCore:3.3.5' into cfpve
urwifemykids 4d2ca87
Add files via upload
urwifemykids 1559872
Core/Maps: Do not allow entering an instance if the player is not ali…
Jildor b18ba61
DB: Remove unsigned floats and recreate views with utf8mb4 in auth da…
Shauren c5663d5
DB/Misc: Fix Alliance GY when dying in Thunder Bluff
Aokromes 0a059c7
DB/Conditions: Fix The Aldor and Scryers flightmasters reputation req…
Aokromes cf74c2a
Core/Units: Fixed crashes in Unit::GetDebugInfo if called in the dest…
Shauren fd85a71
Core/Objects: Corrected TYPEMASK_SEER value incorrectly changed in 0d…
Shauren 03333b1
DB/Loot: Fix thorium ore prospection sometimes resulting in 0 items
Aokromes 3acb25c
Core/Players: Prevent creation of characters with duplicate names
Shauren 4d083b0
Replace wotlk_classic with cata_classic in build status badges in REA…
CraftedRO 262a1e5
Core/Objects: Move personal summon handling from TemporarySummon/Game…
matanshukry cb9b34d
Core/Objects: Refactor private object checks into separate function
Shauren b502bc4
Core/Objects: Pass privateObjectOwner guid directly to SummonCreature…
Shauren 762a32c
Core/Object: Implement FindNearestCreatureWithAura (#28410)
Nyr97 da73672
Core/Objects: Implement FindNearestCreatureWithOptions helper functio…
Seyden 78fe841
Core/Creatures: Implement StringId for Creatures, a custom identifier…
Seyden b10823f
Core/Creatures: Fix logic when searching for nearby creatures by Stri…
Odyssey 36bd2df
Core/Objects: Unify WorldObjectSearcher classes into one common imple…
Shauren d019719
Core/Objects: Unify GameObjectSearcher, UnitSearcher, CreatureSearche…
Shauren 1f6a6d2
Core/GameObjects: Added stringid to gameobjects
Shauren 6e64548
Core/Objects: Added GameObject type parameter to FindGameObjectOption…
Golrag d900e0e
Core/Entities: Added GetStringId helper methods
mdX7 ed41672
Core/Entities: Update StringId assignment to use StringIdType
mdX7 d98bb5f
Core/Entities: nopch build fix
mdX7 5655aa4
Core/Entities: Added possibility to inherit StringIds from other enti…
mdX7 ae6b9bd
Core/Entities: Fixed m_stringIds[0] invalidation when reloading creat…
Shauren 515294f
Player/Emotes: Fix infinite dance and read map animation
Dekadencee 2c0ebbe
Core/Players: Allow delayed teleports to be executed even when not al…
Jildor 5a29762
Scripts/Spells: Implement Titanium Seal of Dalaran (#30291)
Odyssey 4e70960
DB/Loot: Proper loot for starting zone battered chest
Aokromes af1f9c1
DB/Creature: Add waypoints to Harb Foulmountain
Aokromes ff29701
Core/Objects: Switch to using designated initializers instead of chai…
Shauren e3daa2b
Core/Objects: Fixed uninitialized variables in FindCreatureOptions
Shauren 57c1726
DB/Gameobject: Add 4 missing gameobjects in Thunderbluff
Aokromes d225b66
DB/Creature: Add waypoints to Greater Firebird
Aokromes b2f3a7b
DB/Creature: Add waypoints to Murderous Blisterpaw
Aokromes 2dc584c
DB/Creature: Add waypoints to Rex Ashil
Aokromes 492a33f
DB/Creature: Add waypoints to Alshirr Banebreath
Aokromes cfaf559
DB/Creature: Add waypoints to Foulmane
Aokromes e5981cb
DB/Creature: Add waypoints to Vile Sting
Aokromes 275436e
DB/Creature: Add waypoints to Treebole
Aokromes b347cb2
DB/Creature: Add waypoints to Zora
Aokromes ed4d14e
DB/Creature: Add waypoints to Tideress
Aokromes d699b50
DB/Creature: Add waypoints to Archmage Xylem
Aokromes c3bbade
DB/Creature: Replace wrong fixed orientation value with default NULL
Aokromes 1afeabf
DB/Gameobject: All missing Battered chest from starting zones with po…
Aokromes 97111be
DB/Gameobject: Missing Battered Chest, Ghostlands GO 2849
Aokromes e0009a9
DB/Spell: Update Portals to Blasted Lands spell target position
Aokromes 88b1d9d
Scripts/CoS: Do not permabind players upon completing Mal'Ganis encou…
Jildor 1b0f54c
DB/Loot: Sunstrider Isle loot fixup
Aokromes 23cd7c2
DB/Creature: Noarm shoud roam
Aokromes 86bf4fe
DB/Creature: Add missing rare The Behemoth
Aokromes c03d302
DB/Gameobject: Add missing Battered Chest with pooling, Ghostlands GO…
Aokromes 9db32d3
DB/Gameobject: Add missing Large Battered Chest and pool, Ghostlands …
Aokromes a0756e5
DB/Gameobject: Azuremyst Isle Missing Tattered Chest
Aokromes 48b8d47
DB/Gameobject Add missing Battered Chest ID: 106318 to Mulgore with p…
Aokromes 134033a
DB/Gameobject: Add missing Battered Chest ID: 106318 to Teldrassil wi…
Aokromes 15ce7d0
DB/Gameobject: Bloodmyst Isle Missing Tattered Chest
Aokromes d82ff21
DB/Gameobject: Eversong Woods Missing Tattered Chest
Aokromes 2baecc5
DB/Gameobject: The World Tree and the Emerald Dream book update
Aokromes e61ad33
DB/Creature: Felpaw Village, Felwood Deadwood furbog respawning
Aokromes 5da8e80
DB/Misc: Restore data deleted by mistake
Aokromes 113f31d
DB/Creature: Jadefire Run, Felwood Respawn Jadefire Tricksters, Betra…
Aokromes df17886
DB/Creature: Remove one Stormwind guard incorrect pathing
Aokromes 90db558
Core/Objects: Eliminate unneccessary temporary objects and double map…
Shauren d95cf74
Core/PacketIO: Skip sending empty SMSG_UPDATE_OBJECT for transports o…
Shauren e19d590
DB/Creature: Fix incorrect OptionBroadcastTextID for hunter gossip_me…
Aokromes 6180393
DB/Creature: Fix incorrect OptionBroadcastTextID for hunter gossip_me…
Aokromes 5b631c5
DB/Quest: City of Light updates
Aokromes 189bfec
DB/Quest: ObjectiveText locale esES and esMX missing text
Aokromes 32bfd07
DB/Condition: Load Into Catapult and Throw Passenger
Aokromes 98cd499
DB/Creature: Icecrown - Ymirheim Updates
Aokromes 6dd142d
DB/Trainer: Correct ReqLevel for Darnassus and Thunder Bluff spells
Aokromes dfb7f06
DB/Misc: Fix startup errors from Issue
Aokromes f1c2c97
DB/Creature: Add some missing emotes to Birgitte Cranston
Aokromes 586c8a8
DB/Quest: Adjust minimum reputation value required for 'A Special Tha…
Aokromes c7a0218
DB/Quest: Add few missing queststarters
Aokromes b537773
DB/CreatureTexts: Add proper texts for Rivendark, Furywing, Insidion …
Aokromes a377ce2
DB/Creature: Add sniffed waypoints for Hildana Deathstealer for Ymirh…
Aokromes 2c30abf
DB/Gameobject: Culling of Stratholme Love is in the Air spawns
Aokromes df9b09c
DB/Gameobject: Borean Tundra missing Brewfest spawns
Aokromes 1a578fa
DB/Gameobject: Wintergrasp missing Brewfest spawns
Aokromes 6457918
DB/Gameobject: StormPeaks Missing Brewfest spawns
Aokromes e762eb2
typo fix
Aokromes 52c73f9
typo fix 2
Aokromes c7fdf58
DB/Gameobject: Sholazar Basin missing Brewfest spawns
Aokromes dd7ee3c
DB/SAI: Add missing spell to Ravenous Windroc
Aokromes 3618839
DB/Gameobject: Dragonblight Missing Brewfest spawns
Aokromes 9883014
DB/Gameobject; Zul'Drak missing Brewfest spawns
Aokromes dd27398
DB/Gameobject: Grizzly Hills Missing Brewfest spawns
Aokromes 8405a61
DB/Gameobject: Howling Fjord: Missing Brewfest spawns
Aokromes 12b07e0
DB/Gameobject: Shadowmoon Valley Missing Brewfest spawns
Aokromes a72de0c
DB/Quest: Update Cloth Scavenging Completion (RewardText)
Aokromes 3c9bf7b
DB/Creature: Update Monte Muzzleshot
Aokromes b6bb35b
Core/Spells: Allow persistent area auras to apply all of their effect…
CraftedRO a81e7b2
Scripts/PitOfSaron: Update Ick's reaction state during Explosive Barr…
Jildor b0ca98f
Scripts/ForgeOfSouls: Ensure that Bronjahm teleport is executed when …
Jildor 32b54ff
Core/Spells: Don't treat pets as permanently crowd controlled
Shauren cf27f1c
DB/Creature: Update a Firemane Flamecaller spawn position
Aokromes 225a1bb
Core/Vmaps: Fix inconsistency of hitInstance and hitModel to cause wr…
mdX7 b4d6ca2
Core/vmaps: Removed vmap lookup functions duplicating functionality o…
Shauren 5eed750
Core/vmaps: Improved WMO detection for group models that don't have f…
Shauren ab8c1d6
DB/Creature: Aldor Neophyte at Aldor Rise shoud only be draenei
Aokromes a93b115
DB/Skills: Death Knights shoud start with Journeyman Riding (150)
Aokromes c6fb439
Core/Unit: Fix DualWield Off-hand hit penalty (#30444)
CraftedRO b747124
DB/Creature: Fix people still on combat after killing tyrannus
Aokromes c354f25
TDB 335.24111 - 2024/11/22
31f5866
DB/Misc: Fix Alliance GY when dying in Ironforge
Aokromes c0d8dba
Core/Vmaps: Don't ignore model rotation when calculating liquid level
Shauren 65e2474
Core/Players: Add separate config option for starting money for Death…
heyitsbench 2433148
Core/Spells: Fixed item level requirements for enchanting spells
Shauren 8eab9cb
DB/Gameobject: Blades Edge Mountains Missing Brewfest spawns
Aokromes 0c2d2fe
DB/Gameobject: Zangarmarsh missing Brewfest spawns
Aokromes 4e09333
DB/Gameobject: Nagrand missing Brewfest spawns
Aokromes b7bbc42
DB/Creature: Update Draenei Youngling PvPFlags
CraftedRO fdd42c7
Scripts/AzuremystIsle: Set correct PvP flags for Draenei Survivor (#3…
danielfinke 21a4acf
DB/Creatures: Add missing PvPFlags to many creatures
Shauren 0ae1433
DB/Creature: Buzzard
Aokromes 9d5fce4
DB/Creature: Update Gates of Ironforge Spirit Healer coordinates
Aokromes 586386d
DB/Creature: Update two Shattered Sun Marksman SheathState
Aokromes 1ecd085
DB/Gameobject: Culling of Stratholme Hallow's End spawns
Aokromes 6385b32
DB/Gameobject: Culling of Stratholme Feast of Winter Veil spawns
Aokromes 0803ce1
DB/Hallow's End: Wickerman Festival updates
Aokromes 36503a9
DB/Gameobject: Crystalsong Forest Love is in the Air spawns
Aokromes 4956c91
DB/Gameobject: Dragonblight Love is in the Air spawns
Aokromes 896e8c9
DB/Gameobject: Icecrown Love is in the Air spawns
Aokromes 4f4159a
DB/Gameobject: The Stockade Love is in the Air spawns
Aokromes e393f72
DB/Gameobject: Borean Tundra Love is in the Air spawns
Aokromes dd99638
DB/Gameobject: Howling Fjord Love is in the Air spawns
Aokromes 1adf9e8
DB/Gameobject: Blackrock Depths Love is in the Air spawns
Aokromes 2a090ab
DB/Gameobject: Blackrock Depths Midsummer Fire Festival spawns
Aokromes 72f1489
DB/Gameobject: Blackrock Depths Feast of Winter Veil spawns
Aokromes 7f5790d
DB/Creature: Fix a dberror
Aokromes ae1f80c
Core/Time: Fixed WowTime operator<=>
Shauren 4bec944
Core/Spells: DynamicObject auras will now use the largest radius foun…
Shauren 41e48ff
Core/Battlegrounds: Remove temporary currency bonus auras before rewa…
Shocker e492944
Core/Misc: Reduce code differences between branches
Shauren ba0ed27
Core/Spells: add name for cast_flag_unknown_2 to cast_flag_has_trajec…
Star-lion 8268ab3
DB/Schema: Change basehp/mana/armor in creature_classlevelstatus to u…
DDuarte 7782a17
DB/Quest: Move Priest Garments quest series from c++ to database (#30…
CraftedRO 00875fe
Core/Misc: Reduce code differences between branches
Shauren 01132b1
Core/Misc: Reduce code differences between branches
Shauren 0011c11
Core/Items: Destroy only one item from stack when inserting a gem, no…
Shauren 5a0a660
DB/Schema: Increase size of quest_template.RequiredRaces to mediumint
DDuarte 8b1d6f9
DB/Quest: Warlock quest "The Binding"
Aokromes 61819f2
Core/Misc: Reduce differences between branches and fix data sent in S…
Shauren f8847aa
DB/Creature: Fix Witherheart the Stalker equipment
Aokromes b4adab5
DB/Creature: Add waypoints to Mirelow
Aokromes de9340c
Core/Battlegrounds: Port BattlegroundQueueTypeId changes from master …
Shauren 8565ba9
Core/PacketIO: Converted BattlegroundPackets to classes
Shauren a5d4c46
Fix build with libstdc++-11
Shauren 2346bfb
Merge branch 'TrinityCore:3.3.5' into cfpve
urwifemykids File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/* | ||
* This file is part of the TrinityCore Project. See AUTHORS file for Copyright information | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the | ||
* Free Software Foundation; either version 2 of the License, or (at your | ||
* option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
|
||
#include "ScriptMgr.h" | ||
#include "Player.h" | ||
#include "Group.h" | ||
#include "ObjectAccessor.h" | ||
|
||
enum MiscCrossFactionPVE | ||
{ | ||
ZONE_ICECROWN_CITADEL = 4812, | ||
ICC_MAP_ID = 631, | ||
ZONE_TRIAL_OF_THE_CHAMPION = 4723, | ||
TOCHAMPION_MAP_ID = 650, | ||
ZONE_TRIAL_OF_THE_CRUSADER = 4722, | ||
TOCRUSADER_MAP_ID = 649, | ||
ZONE_PIT_OF_SARON = 4813, | ||
POS_MAP_ID = 658, | ||
ZONE_HALLS_OF_REFLECTION = 4820, | ||
HOR_MAP_ID = 668, | ||
ZONE_FORGE_OF_SOULS = 4809, | ||
FOS_MAP_ID = 632, | ||
ZONE_HALLS_OF_STONE = 4264, | ||
HOS_MAP_ID = 599, | ||
ZONE_THE_NEXUS = 4265, | ||
TN_MAP_ID = 576, | ||
ZONE_WARSONG_GULCH = 3277, | ||
WSG_MAP_ID = 489, | ||
ZONE_ARATHI_BASIN = 3358, | ||
AB_MAP_ID = 529 | ||
}; | ||
|
||
class CfPlayerScript : public PlayerScript | ||
{ | ||
public: | ||
CfPlayerScript() : PlayerScript("CfPlayerScript") {} | ||
|
||
// Called when a player enters the world (logs in or teleports) | ||
void OnLogin(Player* player, bool firstLogin) override | ||
{ | ||
HandleFactionChange(player, player->GetMapId()); | ||
} | ||
|
||
// Called when a player changes zones | ||
void OnUpdateZone(Player* player, uint32 newZone, uint32 /*newArea*/) override | ||
{ | ||
HandleFactionChange(player, newZone); | ||
} | ||
|
||
private: | ||
// Store the original faction in a map | ||
std::unordered_map<uint64, uint32> originalFactionMap; | ||
|
||
void HandleFactionChange(Player* player, uint32 zoneOrMapId) | ||
{ | ||
static const std::set<uint32> zoneSet = { | ||
ICC_MAP_ID, TOCHAMPION_MAP_ID, TOCRUSADER_MAP_ID, POS_MAP_ID, | ||
HOR_MAP_ID, FOS_MAP_ID, HOS_MAP_ID, TN_MAP_ID, WSG_MAP_ID, AB_MAP_ID | ||
}; | ||
|
||
if (zoneSet.count(zoneOrMapId)) | ||
{ | ||
// Change faction to match the group leader | ||
if (Group* group = player->GetGroup()) | ||
{ | ||
if (Player* leader = ObjectAccessor::FindPlayer(group->GetLeaderGUID())) | ||
{ | ||
if (originalFactionMap.find(player->GetGUID()) == originalFactionMap.end()) | ||
{ | ||
// Store the original faction | ||
originalFactionMap[player->GetGUID()] = player->GetFaction(); | ||
} | ||
player->SetFaction(leader->GetFaction()); | ||
} | ||
} | ||
} | ||
else | ||
{ | ||
// Restore player's original faction | ||
auto it = originalFactionMap.find(player->GetGUID()); | ||
if (it != originalFactionMap.end()) | ||
{ | ||
player->SetFaction(it->second); | ||
originalFactionMap.erase(it); // Clean up the map after restoring | ||
} | ||
} | ||
} | ||
}; | ||
|
||
void AddSC_cfpve() | ||
{ | ||
new CfPlayerScript(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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