Commit Graph

115 Commits

Author SHA1 Message Date
Gultask
0ddf00c7be fix(Core/Gameobject): Fix lootable chests related to quests but not having quest loot (#15197)
Authored-by: Shauren <shauren.trinity@gmail.com>
2023-03-01 17:36:56 -03:00
Kitzunu
f039836a2f chore(Core/Misc): Change all TODO to doxygen comment (#14966) 2023-02-12 10:05:34 -03:00
Maelthyr
e37e6327f0 refactor(Core/GameObject): Split GameObject for Dynamic Crea/Go (#14889)
Co-authored-by: Maelthyrr <maelthyrr@users.noreply.github.com>
2023-02-12 10:05:13 -03:00
Skjalf
dba8c49bce chore(Core/Object): Rename GetGOData() to GetGameObjectData() (#14875) 2023-02-05 08:35:52 -03:00
Benjamin Jackson
c8bbea9e1b fix(Core/GameObject): Make fishing bobber finish a channeled spell rather than interrupt in all cases. (#14422) 2023-01-28 11:00:07 +01:00
Kitzunu
4870b14b1f refactor(Core/Object): getLevel() -> GetLevel() (#14122)
* refactor(Core/Object): getLevel() -> GetLevel()

* fix build and sneak some doxygen in

* codeSTLE

* codestyle
2022-12-31 17:39:23 +01:00
UltraNix
d32daab969 fix(Core/GameObject): Implement restock mechanic for non-consumable gameob… (#13950)
Core/GameObject: Implement restock mechanic for non-consumable gameobjects.

Don't allow non-consumable goobers/chests to despawn on use.
Source: TrinityCore.
Fixes #13909
2022-12-06 12:44:44 -03:00
UltraNix
984a389d37 fix(Core): Crashfix. (#13113)
Fixes #13111
2022-09-25 10:40:37 -03:00
DavuKnight
d8598c764e feat(core): OnFfaPvpStateUpdate Event (#13023)
* Event for Notification when the Player enters into or Leaves Ffa

* Bug and Formatting Fixes
2022-09-21 08:33:28 -04:00
ZhengPeiRu21
25f88caa42 fix(Core): Correct Post 3.1 Fishing Skill Leveling (#12996) 2022-09-18 22:09:47 -03:00
ZhengPeiRu21
f01459553f feat(Core): Hide Quest Sparkle Config Option (#13005) 2022-09-13 21:40:27 -03:00
Maelthyr
d0d1671745 feat(Core/Debug): GetDebugInfo implementation (#12705)
Cherry-pick: 9a924fb9d5

Co-authored-by: jackpoz <giacomopoz@gmail.com>

Co-authored-by: jackpoz <giacomopoz@gmail.com>
2022-08-15 09:43:41 -03:00
Skjalf
e476533e6e chore(Core/GameObject): Clear an error that often doesn't mean anything (#12689)
* chore(Core/GameObject): Clear an error that often doesn't mean anything

* drop it to debug
2022-08-09 12:57:49 -03:00
IntelligentQuantum
cc52712ac1 refactor(Core/AI): factory functions cleanup (#11779) 2022-07-15 16:11:49 +02:00
UltraNix
12a07ff91f fix(Core/Spells): Fixed LoS problems with hunter traps. (#12348)
* fix(Core/Spells): Fixed LoS problems with hunter traps.

Fixes #12332

* missing
2022-07-10 14:18:36 -04:00
UltraNix
f6ede1a503 fix(DB/ZulGurub): Hoodoo Piles should not melee atack their targets. (#12269)
Will of Hakkar is casted on pile looter.
Fixes #12186
2022-07-09 10:12:16 -04:00
Skjalf
32ba21d029 feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook (#12316)
* feat(Core/Scripting): Implement OnAllowedForPlayerLootCheck() hook

* reverse logic
2022-07-09 00:10:04 -03:00
Maelthyr
d928d8d96a refactor(Core/Unit): PC&NPC Immunity (#11986)
* initial

* refactor(Core/Unit): PC & NPC Immunities

Cherry-pick TC: 74af880217

Co-authored-by: Treeston <treeston.nmoc@gmail.com>

* fix builds error

Cherry-pick TC: 74af880217

Co-authored-by: Treeston <treeston.nmoc@gmail.com>

* Fix nef combat, and replace SetFlag by SetUnitFlag

* fix combat with jedoga

Co-authored-by: Treeston <treeston.nmoc@gmail.com>
2022-06-18 08:16:45 -04:00
Nefertumm
396fd35ed5 fix(Core/Spells): Implement SPELL_EFFECT_ACTIVATE_OBJECT (#11648)
Co-authored-by: jackpoz <giacomopoz@gmail.com>
2022-06-13 21:10:31 -03:00
UltraNix
f28c678c14 fix(Core/Spells): Hunter traps should not be activated by targets not… (#11971)
fix(Core/Spells): Hunter traps should not be activated by targets not in LoS.

Fixes #11432
2022-06-06 09:03:24 -03:00
Hanabi
a6a2ca8ef7 feat(Core/GameObjects): Instance gameobject save data implementation (#11113)
* fix(Core): Save gameobject state on instances

Currently, azerothcore doesn't save gameobject states on instances.
Whenever there's a re-start or crash, the instance's gameobjects and
their states aren't saved, producing un-wanted behaviours and blocking instances at times.

Implemented CRUD for new table `instance_saved_data` that holds the states of gameobjects.

- When worldserver launches and gameobjects are loaded, this will check
  if this object's state exists on the DB and sets the previous state.
- On instance deletion (reset) these states are also removed based on
  the instance ID.
- Whenever a gameobject state changes inside a dungeon or raid, we save
  on the database the set state.

* Select query to synchronous and used FindMap()

* loading gameobject states on create

* reseting instance saved data

* missing reset methods and on create state

* database structure

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/GameObject/GameObject.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Entities/Player/PlayerMisc.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Groups/Group.cpp

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* codestyle

* table changes

* table style

* codestyle

* table changes for columns

* data sanitization

* todo:

- Finish loading db data into the containers
- Using containers to find data
- How to get data from ObjectMGR inside Gameobject?

* loading on start up and db changes

* Removing unused data structure

* Uninitialised integer

* Whitespace

* clean-up and hooks to save states on memory

* Codestyle MySQL deprecated backticks

* i dont understand codefactor

* build

* Update data/sql/updates/pending_db_world/rev_1643395587559675400.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* Update src/server/game/Globals/ObjectMgr.h

Co-authored-by: Kargatum <dowlandtop@yandex.com>

* review changes

* unecessary removal

* pushback instead of emplace

* wrong database update

* Update ObjectMgr.cpp

* missing check

* removing entry from the PR

* missing removals

* last delete

* build

* aha! Found the culprit for the sudden assert errors

* type safety, save only important gameobjects

* static cast to unsigned short

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>

* type changes

* queries fix

* fix build

* enabling which gameobjects to save on the database

* deadmines iron clad door

* Adjustment to gameobject onj create state and instances:

- Gnomeregan doors and Grubbis boss state
- Deadmines missing doors
- Stratholme gameobjects state saved

* forgot emi blastfuse change to despawn

* Leaving group logic

* codestyle

* fixing merge issues

* prevent bad behaviour

* brain meltdown

* Update data/sql/updates/pending_db_characters/rev_1643629468629316100.sql

* Update data/sql/updates/pending_db_world/rev_1649359139539727000.sql

Co-authored-by: Claudiodfc <54484196+claudiodfc@users.noreply.github.com>
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
Co-authored-by: Kargatum <dowlandtop@yandex.com>
Co-authored-by: Skjalf <47818697+Nyeriah@users.noreply.github.com>
2022-05-24 10:33:45 -03:00
Tralenor
6cf82e3bd6 feat(Core/DB): Add Hooks On creature/game object save to db (#11246)
* implement OnCreatureSaveToDB and OnGameObjectSaveToDB Hooks

* fix Whitespaces in ScriptMgr.h

Co-authored-by: Timothée Moos <t1997.m@gmx.net>
2022-05-06 00:42:49 -03:00
UltraNix
47790c9714 fix(Core/Vmaps): Stop M2s from occluding for spellcast LoS. Original autho… (#11341)
* Core/Vmaps: Stop M2s from occluding for spellcast LoS. Original authors: @Shauren & @HelloKitty

Fixes #11293

* buildfix.

Co-Authored-By: HelloKitty <5829095+HelloKitty@users.noreply.github.com>
2022-04-10 09:24:35 -03:00
Kitzunu
b41967a067 feat(Core/GameObject): Gob flag helpers (#11287) 2022-04-05 13:52:58 +02:00
Kitzunu
535c7451a2 feat(Core/Unit): New helpers for DynamicFlags (#11230)
* feat(Core/Unit): New helpers for DynamicFlags

* cherry-pick commit (d611925dc7)

Co-Authored-By: Shauren <shauren.trinity@gmail.com>

* oopsie

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2022-04-01 07:14:29 -03:00
Kitzunu
856aed6fc6 feat(Core/Unit): New helpers for UnitFlag and UnitFlag2 (#11227) 2022-03-30 07:59:42 -03:00
acidmanifesto
77f13636b7 fix (core) Script Names not loaded with manual add (#11102)
This fixes Script names not being loaded with npcs and gameobjects when manually added with the .npc\gameobject add cmd that would lead the user to restart the server to load up the npc\gameobject with the script that was manually added
2022-03-22 09:49:06 -04:00
UltraNix
68891ccd74 fix(Core/Loot): Fixed some chests inside dungeons not being bound only to participants. (#10995) 2022-03-18 18:33:04 -03:00
UltraNix
982be6de00 fix(Core/GameObjects): move activation code of traps to GO_ACTIVATED (#10537)
- Original author: @Gacko
2022-02-19 22:26:26 +01:00
Kitzunu
cf65cd6baf refactor(Core/Misc): sqrt/log/exp() to std::sqrt/log/exp() (#9792) 2022-02-09 11:59:30 +01:00
Kargatum
de13bf426e feat(Core/DBLayer): replace char const* to std::string_view (#10211)
* feat(Core/DBLayer): replace `char const*` to `std::string_view`

* CString

* 1

* chore(Core/Misc): code cleanup

* cl

* db fix

* fmt style sql

* to fmt

* py

* del old

* 1

* 2

* 3

* 1

* 1
2022-02-05 00:37:11 +01:00
Kargatum
5969df4e30 refactor(Core/Logging): switch to fmt style for LOG_ (#10366)
* feat(Core/Common): add support fmt style for ASSERT and ABORT

* correct CheckCompactArrayMaskOverflow

* 1

* Update src/server/game/Spells/Spell.cpp

* rework logging

* add fmt replace logs

* logging

* FMT_LOG_

* settings

* fix startup

* 1

* 2

* 3

* 4

* 5

* fmt::print

* to fmt
2022-01-27 16:44:41 +01:00
Kargatum
8b7df23f06 feat(Core/Time): Implement saparated manager for game time (#8630) 2022-01-24 17:55:00 +07:00
Francesco Borzì
9dc88def35 refactor(Core): apply clang-tidy modernize-* (#9975)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
2022-01-17 14:35:07 +01:00
IntelligentQuantum
725b1266b4 refactor(Core/Packet): Chat (#9509)
* Chat

* .

* Update GameObject.cpp

* Update Object.cpp

* Update Player.cpp
2022-01-08 07:11:06 -03:00
Kitzunu
cb7e355291 refactor(Core/Misc): sin() to std::sin() (#9795) 2022-01-06 19:29:40 +01:00
Kitzunu
69683a3472 chore(Scripts/Misc): Cleanup some more JustDied hooks (#9768) 2021-12-31 12:00:40 -03:00
UltraNix
3b8e3eb609 fix(DB/Gameobjects): Spirit Candle should properly give buff to nearby players (#9690)
Fixes #8815
2021-12-17 18:29:08 +01:00
Kitzunu
4a6db8f8c6 fix(Core/Object): Add infinite gob check (#9667)
* cherry-pick commit (b0db728c49)

Co-authored-by: Kittnz <5845231+kittnz@users.noreply.github.com>
2021-12-17 18:06:57 +01:00
Kargatum
51adbffae4 feat(Core/Modules): add separated lib for modules (#9281) 2021-12-02 20:28:58 +07:00
acidmanifesto
29f49108a5 chore(Core): Remove unnecessary slang Cosmetic (#9325)
* Remove unnecessary slang

Removes ZOMG! that is used in the src in logging and notes. Completely Unnecessary. Contributes to nothing useful. Inflates source. Not needed at all in any shape or form. Not Developer Lingo either.

* Further Clean Up

Removed Profanity

* sensible grammar correction

* More ZOMG! removal
2021-11-25 04:31:54 -03:00
UltraNix
140374e3e0 fix(Core): Fixed dead loop. (#9312) 2021-11-24 10:27:10 -03:00
patou01
0f4268bea7 fix(Core/DB): add exceptions for shield and badge. Update db for positions (#9169)
Co-authored-by: Patou01 <youdontneed@this.com>
2021-11-23 00:34:11 +01:00
UltraNix
dc9c3a5fe4 fix(Core/GameObjects): Lockpicking timer on gameobjects should reset … (#9203)
* fix(Core/GameObjects): Lockpicking timer on gameobjects should reset after 10 minutes.

Fixes #8936
2021-11-22 12:07:55 -03:00
Kargatum
f62664c987 refactor(Core/Misc): headers cleanup (#9259) 2021-11-22 17:24:39 +07:00
acidmanifesto
de6af87bd3 fix(Core/Objects): increase sight range of objects & correct general defau… (#9180) 2021-11-17 16:00:01 -03:00
Malcrom
f106de8788 refactor(Core): update getFaction to GetFaction and setFaction to SetFaction (#8708) 2021-11-01 17:04:32 +01:00
Skjalf
041b327c80 fix(Core/GameObject): Spawn linked traps when gameobjects are created (#8572) 2021-10-26 22:15:30 -03:00
acidmanifesto
bcd1a701ac fix(Core): ScriptName not readable in creature and gameobject table fix (#8715) 2021-10-25 14:25:13 +02:00
Skjalf
c2381a5a1c fix(Core/BattlegroundAV) Irondeep/Coldtooth Supplies never despawning (#8612) 2021-10-22 00:03:47 +02:00