Commit graph

221 commits

Author SHA1 Message Date
stfx
012c2ef51b [12155] Prevent saving/loading/init capture points in instances
Reason for this are:
1) We don't want them saved/loaded between bg games
2) Saving cp slider is done by go id and would not work for instances
3) There are visual-only capture points in bg (eots)
4) It would be possible to only enable the capture points on bg start

TODO: Move this to OutdoorPvP base class
2020-02-16 20:41:33 +00:00
stfx
522ccf02ae [12154] Add HandleEvent and HandleGameObjectCreate to battleground class 2020-02-16 20:41:32 +00:00
stfx
c8814791e1 [12153] Remove unneeded InBattleGround() as it is already checked by GetBattleGround()
Also call OutdoorPvP handlers before instance script ones
2020-02-16 20:41:31 +00:00
Shyax
6e76dbae3f [12128] Fix more warnings - close #4
* Remove warning: enumeration value '<value>' not handled in switch
* Remove warning: enumeral and non-enumeral type in conditional expression
* Remove warning: too many arguments for format

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2020-02-16 20:41:05 +00:00
Schmoozerd
1014f50b89 Fixup last commit (why didn't it ammend.. 2020-02-16 20:40:58 +00:00
Xfurry
e955c3bc8f Add Outdoor PvP handlers to various files 2020-02-16 19:05:40 +00:00
stfx
525ec3ea4c Use OutdoorPvPMgr to save/load capture point data when grid unloads 2020-02-16 19:05:36 +00:00
stfx
b3ab347028 [12096] Prevent unloading go before all players left capture point zone
This fixes m_UniqueUsers not being cleared for example if grid is set to idle and would therefore think that some players are still in range on grid reactivation causing the slider not to appear
2020-02-16 18:55:10 +00:00
stfx
428bb2c5e9 [0049] Implement SMSG_DEFENSE_MESSAGE for the upcoming opvp system
Also fix callig go type 29 progress event if there is no neutral area (like in Halaa)
2020-02-16 07:37:47 +00:00
Yaki Khadafi
f7cd8ce52a Fix SMSG_UPDATE_OBJECT, SMSG_DESTROY_OBJECT, and some teleport opcodes
Authors: Strawberry, Trinity, me
Signed-off-by: Yaki Khadafi <elsoldollo@gmail.com>
2020-02-16 02:53:44 +00:00
Salja
22bfaa12b0 Mage 400 INTO master/434
Signed-off-by: Salja <salja2012@hotmail.de>
2020-02-16 01:59:51 +00:00
Schmoozerd
835d1c7479 [12069] Cleanup comment style 2012-07-22 14:39:31 +02:00
Schmoozerd
e32b9953a1 Cleanup Operator padding 2012-07-20 17:38:23 +02:00
Schmoozerd
2bd41afb3e Various Cleanups (game F-K) 2012-07-19 21:46:24 +02:00
Xfurry
5a0f668515 [12060] Implement GO_TYPE_CAPTURE_POINT support
Patch also developed by stfx

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-07-19 21:32:04 +02:00
Schmoozerd
6de10526cc [12058] Remove more header includes 2012-07-19 04:15:13 +02:00
Schmoozerd
0e0a765312 [12026] Replace std containers of ObjectGuids with some predefined types
Based on patch by stfx

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-07-03 18:47:05 +02:00
Schmoozerd
010d29d1ed [11985] Implement support for go_template_scripts
Add a new table `gameobject_template_scripts` to start scripts for any type gameobject.
Scripts in this table are triggered for all gameobjects on GameObject::Use

Note: The table `gameobject_scripts` is expected to not be required very much longer, and will most likely be removed someday
2012-05-04 20:39:48 +02:00
Schmoozerd
d08edbd93c [11980] Improve support for wild summoned GOs
* Support GetGameObject for wild summoned GOs
* Proper delete WildSummoned GOs after they are used
2012-04-26 18:08:35 +02:00
stfx
f3f3349661 [11973] Various Cleanups
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-22 19:48:05 +02:00
stfx
f153193a02 [11951] Unify loot related code and fix engrish.
Also readd the m_groupLootId check in case the StopGroupLoot will be called from other places

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-12 17:16:37 +02:00
stfx
e79b80727d [11949] Check group id of group loot timer when timer is started. Close pull request #39
Also fix a small possible bug with loot shared to players at similar position on a different map

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-04-11 22:58:51 +02:00
zergtmn
c6a751134c [11928] Some warning fixes 2012-02-16 20:32:17 +06:00
Schmoozerd
49bd484a41 [11922] Add ASSERT helper function to print entry and guid info
Use this in first cases: GetAngle and in PathFinder::BuildPolyPath

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-02-07 17:25:46 +01:00
Schmoozerd
6aab5c1022 [11892] Really fix [11890]. This basicly reverts commit 11890
Remove the actually not required faction check in Player::GetNPCIfCanInteractWith - this is done by IsHostileTo a line before
Improve the Player-login AtWar selection to also consider forced reactions

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-01-31 00:16:21 +01:00
Schmoozerd
3e552fc739 [11890] Fix Player::GetNPCIfCanInteractWith to consider forced reactions
This will fix ie quest 9410 A Spirit Guide

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-01-27 00:20:14 +01:00
darkstalker
461be74c3a [11878] Add group looting rules for gameobjects (chests)
Patch based on original work by Wowka321

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-01-16 22:54:08 +01:00
Schmoozerd
8068dcf6dd [11875] Update Copyright notice to year 2012
Start timemachine and a Happy new year to all!
2012-01-16 17:43:59 +01:00
Schmoozerd
3ae1f25b9b [11848] Change use of ScriptLibrary OnGOUse return value in GO::Use
Now mainly used to allow or prevent DB scripts use
Also some related code cleaned and reordered

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-11-25 20:29:42 +01:00
Schmoozerd
7246e51a13 [11839] Add support to send custom gameobject anim for a few traps
The way to filter by display id is rather ugly, but no better solution is in sight. This should be good enough until better (likely model-data) support can be implemented.
Also it must be changed if more Traps with this behaviour are found.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-11-05 20:05:59 +01:00
stfx
a25982abf6 [11815] Fix sending custom GO animation for Type10 GOs
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-10-08 01:09:00 +02:00
SilverIce
3567e69a3d [11807] Add gameobject_addon table
table holds additional per-guid gameobject data.
currently it contains path rotation info that required for some elevators and transports
2011-09-26 02:34:29 +03:00
SilverIce
7a67f27ab3 [11806] A bit gameobject code refactoring 2011-09-26 00:12:12 +03:00
NeatElves
362f7fb820 [11668] drop redundand line from prev. commit
Signed-off-by: SilverIce <slifeleaf@gmail.com>
2011-06-24 15:36:52 +03:00
SilverIce
f99fcb1b92 [11667] Implement transport path rotation
Transport rotation transforms transport path - this makes possible to have few transports with same entry but with modified paths.
This also solvers problems with some transports (like deeprun tram).
TODO: some transports has non standart rotations, that must be stored in db

Signed-off-by: SilverIce <slifeleaf@gmail.com>
2011-06-24 14:28:08 +03:00
Schmoozerd
a0852287ac [11592] More proper way exclude GO_FLAG_LOCKED | GO_FLAG_NO_INTERACT from reset in instances.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-06-03 12:33:56 +04:00
VladimirMangos
7995a36c69 [11574] Speedup fishing loot prepare for zone == subzone case. 2011-05-31 04:04:05 +04:00
Schmoozerd
0de4e302b3 [11558] Fixes and way work chnages for GO lock/interact state
* Not reset lock/interact state in instances (so until instance reset)
* Do unti-cheating checks for use attempts locked/non-intareactive GOs
* Implement SCRIPT_COMMAND_GO_LOCK_STATE for control lock/interact state of GOs from scripts.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
2011-05-29 04:31:34 +04:00
VladimirMangos
c5b6cc0b37 [11543] Fixed change form to same (powershifting)
Inspired by patch provided by darkstalker.

Client expected receive form field change at form switing including case with switch to same form.
In fact problem too good mangos optimization in part avoid send unchanged values in update fields.

* Added function Object::SendForcedObjectUpdate()
* It used in form apply code for make sure received by client non-form applied state in middle form shifting state.
* It also used for fishing code when client also expected received some update fields chnages before
  animation update. New function send update to all all client instead before used code that send it to fishing player
  and resend later one more time to other players and player itself as normal update.
2011-05-26 17:18:47 +04:00
SilverIce
1b709c8ff8 [11531] Normalize gameobject's quaternion, thanks to zergtmn for pointing 2011-05-24 13:12:48 +03:00
SilverIce
7c86d3f477 [11529] Pack and send to client all gameobject's quaternion components which allows place gameobjects cornerwise.
Update '.gobject turn' command, now you have to specify 3 rotations to turn gameobject: rotation angles around z, y and x axes.
Note to DB devs: use QuaternionCompressed::Unpack to extract rotations from the data that came with UPDATEFLAG_ROTATION.
2011-05-24 03:49:13 +03:00
VladimirMangos
249fb836ca [11490] Alow implicit cast ObjectGuid->uint64 and only explicit uint64->ObjectGuid
Now safe allow this casts in like way after completed convertion to ObjectGuid use.
Also simplify code in result allowed auto cast to uint64.

Please _not_ add new uint64 storages (local and in structures) for guid values.
2011-05-15 22:04:57 +04:00
VladimirMangos
b8bb108757 [11466] Use ObjectGuid in Map::m_objectsStore 2011-05-10 22:25:06 +04:00
VladimirMangos
ef6a48fe03 [11465] non-ObjectGuid guids in random places.
Only ChannelMgr code wide use uint64 guids now, and Map object stores.
2011-05-10 21:27:49 +04:00
zergtmn
55709e265e [11381] Add methods GetDisplayId/SetDisplayId for gameobjects
Useful for GO type 33
2011-04-19 17:01:59 +06:00
NoFantasy
7b070a93aa [11251] Add some base code for GAMEOBJECT_TYPE_CAPTURE_POINT
Note that code is only a tiny start to implement these gameobjects, and are most likely wrong in itself as conditions for calling events does not exist yet.
To be used in further development.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-03-15 11:14:05 +01:00
SilverIce
d597ffe10e [11183] Use map type dependent visibility distance for gameobject, dynamicobject and corpse visibility checks
Also drop no more needed Visibility.Distance.Object config option
2011-02-18 02:09:47 +02:00
VladimirMangos
8feaf211f1 [11168] Use MapPersistentState for access to Pool System dynamic data.
* Direct store pool system dynamic data in sPoolMgr replaced by
  shared pool system data object (for all non instanceable maps)
  into WorldPersistentState, and own copies of pool system data
  object in DungeonPersistentState/BattlegroundPersistentState.
  This let have pools with object at many non-instanceable maps,
  and single map pools with unique state for each instance.

* Avoid direct global grid data modify from pool system, and use for this also
  recently added local for MapPersistentState grid spawn data.

* Implemented proper API for update pool system data in MapPersistentStates
  from GameEvent system.

* Initialize pool system state at MapPersistendState creating.
  For shared pool system state for non-instanceable maps initilized at first map state
  creating.

Now pool system propertly work in instance also!
2011-02-15 14:40:56 +03:00
VladimirMangos
04c21c95d3 [11159] Remove now redundent GetDBTableGUIDLow support.
Now any creatures/gameobjects loaded base at DB data
in non-instanceable/instanceable maps always have same guid
as in DB data.

* Also remove useless by same reasons MaNGOS::GameObjectWithDbGUIDCheck
2011-02-14 07:20:09 +03:00
VladimirMangos
cf685da47a [11139] Use for Creature/GameObject local per-map guids
* Creature/GameObject guid generators moved to Map
* For avoid wrong not converted cases generic function in ObjectMgr has been replaced by
  specilized guid generation function like sObjectMgr.GeneratePlayerLowGuid().
  This let catch all cases that need update in custom code or scripts.
* Drop many ObjectAcessor.h now dead code. This is also make mangos more thread safe.
* Restore one more time unix build broken in prev. commits.

Note: many cases when something not wotk in instance but work in continents
possible magicly start work after this commit. For example, some gm commands.
From large systems that need more chnages for start work in full power in instances
can be referecned pool/gamevent system. Last need just small hacks drop changes but
in will addded in independent commit.
2011-02-12 09:52:16 +03:00