-
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
Open
urwifemykids
wants to merge
313
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 all commits
Commits
Show all changes
313 commits
Select commit
Hold shift + click to select a range
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 52af034
Core/Spells: Added missing DBC data for some food effects. (#30679)
r4d1sh a827230
Core/Pets: Implemented sound playback when dismissing warlock pets (#…
r4d1sh 13eb405
Core/Pets: a827230910fd7e3e64bcb5526e2778b8b4752da4 followup reducing…
Shauren 2d4eb58
DB/Spell: Death Knight T10 Melee 4P Bonus fix
Aokromes dae3d39
DB/Spell DK blade barrier skill
Aokromes c288093
DB/Quest: Warlock quest series Orb of Orahil
Aokromes 14bc5bf
DB/Quest: Warlock quest "Cleansing of the Orb of Orahil"
Aokromes 31453f9
DB/Quest: Warlock quest "The Completed Robe"
Aokromes ec8fbce
DB/Creature: Fix model for creature 6546 (Tabetha)
Aokromes bfcf09d
DB/Quest: Update "Lessons Anew" Completion (RewardText)
Aokromes 6f30db7
DB/Quest: Allow "The Multiphase Survey" quest for both sides
Aokromes 62fe2d6
Core/Chat: Corrected names and descriptions for GM.LowerSecurity conf…
r4d1sh d2c1841
Core/Battlegrounds: Corrected Arathi Basin near victory sound and sco…
CraftedRO 939ca92
Core/Misc: Remove non-portable hack of including `<__msvc_chrono.hpp>…
StephanTLavavej 2346bfb
Merge branch 'TrinityCore:3.3.5' into cfpve
urwifemykids de3ba52
Core/GameObject: Activated world chests will now despawn after 5 minu…
CraftedRO 8785c0d
Core/Groups: align the player's dungeon/raid difficulty with the grou…
Jildor 1942647
Dep: Replace basic_deadline_timer with std::chrono based basic_waitab…
Shauren 81ab02d
Core/Spells: Remove ProcEventInfo::GetProcTarget to avoid confusion. …
r4d1sh b32ff0c
Scripts/Spells: Fix wrong proc target for spell 23552
Shauren b4168ee
Core/Spells: Reduce differences between branches (port refactors from…
Shauren 310e001
DB/Creature: Update Knot Thimblejack spawn coordinates
Aokromes 375b43e
DB/Misc: Remove spawn of Isalien
Aokromes 48baec0
Core/Players: Fixed wrong spell id of Seal of Righteousness being giv…
Shauren caa058d
Core/PacketIO: Implemented CMSG_CORPSE_MAP_POSITION_QUERY/SMSG_CORPSE…
Shauren 6522446
Core/Players: Name some unknown player flags
Shauren 88a9a1a
Core/Misc: Reduce differences between branches
Shauren 114b84d
Core/Transports: Fixed wrong transport guid generator initialization
Shauren fab59ab
DB: Fix db startup errors related to 48baec04dfd3b654c945df9b4fc2e8fe…
Shauren c9ba09a
Core/Scripts: updated more documentation comments for spell script ho…
Ovahlord 963e1bf
DB/Quest : Wolves Across the Border The reward text does not take int…
Aokromes 7b530c4
DB/Quest : Investigate Echo Ridge The reward text does not take into …
Aokromes 4ffdb72
DB/NPC Deputy Willem Missing greeting in the ruRU localization
Aokromes 0ef5a2b
DB/Quest : Skirmish at Echo Ridge The reward text does not take into …
Aokromes 80b4dba
DB/Text: Correct Marshal McBride's Documents Text in the ruRU localiz…
Aokromes 781b8ae
DB/Quest : A Threat Within Text of the task from Cataclysm in the ruR…
Aokromes 52dd477
DB/Creature: Add missing movement flags to The Lich King
Aokromes 578f8eb
DB/Creature: Update Spitelash Serpent Guard
Aokromes d0292ee
Core/Spell: Fix Priest T5 4p Sadist
Aokromes b8582e7
Core/Battlegrounds: Fix possible shutdown crash
Shauren 1978f8c
DB/QUEST: Plan B, fix gossip
Aokromes 8c3b91b
DB/Quest: Teldrassil, breadcrumb quests
Aokromes 4ce3c05
DB/Quest: Teldrassil, missing quest greetings
Aokromes 1f7c5d9
DB/Quest: Teldrassil, missing and corrected quest emotes
Aokromes deee391
DB/Creature: Correct respawn time for dwarves in the Lyceum BRD
Aokromes 670f2bb
DB/misc: Some corrections in ruRU localization (Part 1)
Aokromes 8c76cca
Core/Spells: Correct implementation of SPELL_ATTR2_TRIGGERED_CAN_TRIG…
Shauren 059b1b3
Core/Objects: Fix orientation for non-unit transport passengers in SM…
Shauren 1e7f741
Scripts/Scarlet Monastery: Do not start path for npc_scarlet_trainee …
CraftedRO 91473e7
Scripts/BlackrockDepths: In the Lyceum both braziers have to be used …
CraftedRO 608c579
DB/Gameobject: Update position of The Blood Furnace Broggok Cell Door…
Aokromes f3941ff
DB/Creature: Fix Darkspear Dragon Hunter equipment
Aokromes e792285
Core/Spells: Updates autoshoot spell target in case of client-side ta…
CraftedRO 4d0903c
Core/Misc: Reduce differences between branches
Shauren 3f42a4d
DB/Gameobject: Make ICC InstancePortals and Meeting Stone visible for…
Aokromes 941e3dc
DB/Creature: Update one more Stormwind Guard spawn position
Aokromes 7645a56
DB/Creature: Gorn shoudn't be mounted
Aokromes c075134
DB/Creature: Update few Nagrand Spirit Healers spawn position
Aokromes 1d8caf1
DB/SAI: Add forced despawn in 3 seconds on death to all Ring of Blood…
Aokromes c1a30fd
DB/Gossip: Add missing Gurthock gossip_menu
Aokromes 82f91f5
DB/Creature: Add proper Ghost aura to all Spirit Healers and remove w…
Aokromes b698955
DB/Quest: Teldrassil, the quest "Moonglade" is missing intro
Aokromes eb75f39
DB/Quest: Teldrassil, a few druid quests are missing outro
Aokromes aafd841
DB/Misc: Few more updates to Ring of Blood NPC
Aokromes bd50bee
DB/Quest: Teldrassil, A Few quests are missing Reward next quest
Aokromes 1c10fdf
Core/Auth: Do not close Authserver at startup when no valid realms found
CraftedRO 11d2feb
DB/Creature: Fix Witherbark Scalpers
Aokromes 9be6377
DB/Gameobject: Add two missing quests to a gameobject_queststarter
Aokromes a15009a
DB/Quest: Teldrassil, fixes to the quest "Sunscorched Shells" outro
Aokromes 7127a2f
DB/Quest: Teldrassil, the quest "Training the Beast" is missing outro
Aokromes e41fb1e
DB/Quest: Teldrassil, the quest "Vorlus Vilehoof" is missing outro
Aokromes 33118da
DB/Quest: Teldrassil, the quest "Taming the Beast" is missing outro
Aokromes d10093e
DB/SAI: Fix for "Moonglade" quest intro
Aokromes b9fe377
DB/Quest: Two Teldrassil quests are missing PrevQuest
Aokromes 60aa176
DB/Quest: Teldrassil, corrected quest texts
Aokromes af4f436
DB/SAI: Denalan, fixes to quest outros
Aokromes 32fbb07
DB/Gameobject: Fix overlapping Water Barrels/Food Crates in Stormwind…
Aokromes 95f8cf0
DB/Gameobject: Update position of the trigger "Pools of Arlithrien Mo…
Aokromes 81434cf
DB/NPC: Spirit of Sathrah
Aokromes c3cb400
DB/SAI: Fix Gahz'rilla random movement on wp2 ended
Aokromes f5e80a6
DB/Creature: Remove bleed immunity from some npc part 1
Aokromes c9591eb
DB/Creature: Add missing AnimTier Hover for Zidormi
Aokromes 3a13b6a
DB/Creature: Update Warmage Kath'leen creature_equip_template
Aokromes 633a375
DB/SAI: Bogling, add random movement
Aokromes 261af19
DB/Creature: Westfall Woodworkers are only humans
Aokromes 0dfbb89
DB/SAI: Fixes for the quest "Mist"
Aokromes a3f8eac
DB/Creature: Update few more Spirit Healers spawn position
Aokromes bc2d603
DB/SAI: Fix Impsy random movement on wp11 end
Aokromes d3eca55
DB/Creature: Few updates to Hellfire Peninsula
Aokromes 21dda44
DB/Gameobject: Add sniffed spawns and pools to Half-Buried Bottles
Aokromes 6aaff44
DB/Creature: Add random movement to King Mukla
Aokromes ba27606
DB/Condition: Teldrassil, Flight Master Vesprystus gossip menu option
Aokromes d5110ee
DB/Condition: Teldrassil, Arch Druid Fandral Staghelm gossip menu option
Aokromes ffbc0f9
DB/Quest: Teldrassil, quest is missing quest flag
Aokromes c3ee849
DB/Waypiont: Donna and William - Incorrect route points
Aokromes 0d027af
Core/Guilds: Fix setting guild notes
Shauren 27b759e
Build: Perform CMake check_cxx_source_compiles checks using the same …
Shauren 53f0579
Core/Database: Silence deprecation warning on mysql_stmt_bind_param
Shauren 9cfd55e
Build: Replaced deprecated exec_program with execute_process
Shauren cf11fea
Tests: Add missing include
Fabi 4bc23a0
Build: Silence cmake warning about newline in variable
Shauren fb8a891
Build: Moved CheckSymbolExists include to correct file
Shauren b7783c9
Build: Remove unneccessary /MP compile option when using ninja
Shauren 857d0b2
Build: Unify setting _BUILD_DIRECTIVE preprocessor macro for all comp…
Shauren 9d945f0
Core/Crypto: Rename our Argon2 to avoid possible conflict with librar…
Shauren 3a2bb2f
Build: Normalize executable locations in build directory for all plat…
Shauren 5269de5
Build: Decouple compiler specific settings from os settings
Shauren 8cbb263
Build: CMake cleanup
Shauren 9807e9d
Build: Fixed CMake 3.30 FindBoost deprecation warning
Shauren 8719b30
Build: Disable maybe-uninitialized warning for GCC that incorrectly t…
Shauren bbc8e22
Core: Remove boost iostreams dependency
Shauren 25be3cd
Core/Common: Output stdout/stderr from child process without waiting …
Shauren 9c22e1d
Core/Common: Catch and log child process creation errors
Shauren ae78761
Dep/Boost: Support boost 1.88
Shauren 73085aa
DB/Creature: Remove Neophyte Guardian from Terokkar Forest - The Bone…
Aokromes a1814cf
DB/Quest/Creature: Blackwind Sabercat
Aokromes e5b8798
Scripts/Shadowfang Keep: Check boss state and door state before openi…
CraftedRO 3e753ba
DB/Quest: Darkshore, Two quests are missing Reward next quest
Aokromes f336c73
DB/SAI: Thundris Windweaver, fix to quest outro
Aokromes 2ae24a7
DB/NPC: Gubber Blump
Aokromes 6e96767
DB/SAI: Fix for "Cave Mushrooms" quest intro
Aokromes 3026b2e
DB/Quest: Darkshore, missing and corrected quest emotes
Aokromes f9c0a48
DB/Quest: Darkshore, corrected quest texts
Aokromes 68de830
DB/Creature: Update ruRU locale for shaman totems translation (#30903)
chaosua 01a8320
DB/Gameobject: Remove Courtyard Door Lever script in SFK to prevent p…
Aokromes 4a6b737
Scripts/Dire Maul: Allow players to open The Prince's Chest if Prince…
CraftedRO da2adb6
Scripts/Spells: Implement Putrid Mushroom Primer spell (#30914)
offl 7b0d1f0
Core/Misc: Minor corrections to urls and grammar in logs and comments…
CraftedRO 5ed83ed
Scripts/Spells: Get rid of some database spell scripts (#30915)
offl 71a8e05
Scripts/Spells: Implement generic spell script to cancel aura by id f…
offl ca6aa74
Build: Extract hardcoded list of mysql paths to shared cmake variable
Shauren faef73f
Build: Replace hardcoded mysql search paths with pattern based approach
Shauren b3698c4
Core/Spells: Reserved custom spell attribute SPELL_ATTR0_CU_CAN_TARGE…
mdX7 763dc10
Scripts/Scholomance: Modernize scripts (#30920)
offl e2eb8c2
Scripts/EscapeFromDurnholdeKeep: Modernize scripts
offl 2f331b2
Scripts/TheBlackMorass: Modernize scripts
offl f7f64ed
Scripts/SteamVault: Modernize scripts (#30948)
offl 86f8a1e
Scripts/TheArcatraz: Modernize scripts (#30945)
offl d1fa9cb
Scripts/TheBotanica: Modernize Thorngrin script (#30943)
offl 9897255
Scripts/SethekkHalls: Modernize scripts (#30935)
offl 0604168
Scripts/TheSlavePens: Modernize scripts
offl d5470b9
Scripts/Mechanar: Modernize scripts
offl e13dc98
Scripts/AuchenaiCrypts: Modernize Shirrak script (#30938)
offl 2efcfe3
DB/Quest: Darkshore, fix outro of quest "How Big a Threat?"
Aokromes 42ff4c1
DB/Quest: Darkshore, misc fixes to the quest "Therylune's Escape"
Aokromes e965d53
DB/Loot: Finish updating vanilla skinning loot
Aokromes 82158f3
DB/Loot: Add chance to TBC skinning loot
Aokromes 74f9ffe
Core/Spells: Fix hunter pets not losing happiness when dismissed (#30…
CraftedRO 8d6e6c3
Core/Spells: Properly retrieve pet to dismiss for spells with SPELL_A…
CraftedRO f2662cc
Scripts/AuchenaiCrypts: Small corrections to scripts (#30959)
offl e6b9f21
Core/Creatures: Update creature GenerateHealth rounding formula (#30971)
CraftedRO 77d20d6
Core/Misc: Don't teleport players to homebind location when logging o…
CraftedRO b610048
Core/Players: Fix Titan's Grip weapon type restrictions
Shauren aae2bea
Core/Pets: Allow pet commands while hunter is under SPELL_AURA_MOD_PA…
CraftedRO 5c5a047
Scripts/The Escape From Durnholde: Fixed Thrall not resetting state a…
Shauren 1a5af00
Core/Players: Unbreak dual wield
Shauren a856f2b
Merge branch 'TrinityCore:3.3.5' into cfpve
urwifemykids File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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 hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.