Commit graph

313 commits

Author SHA1 Message Date
stfx
27fefb1e96 [0062] Send SMSG_DEFENSE_MESSAGE, SMSG_ZONE_UNDER_ATTACK only to players outside of instances
Also remove team argument from SendDefenseMessage as all texts are sent to all teams, use seperate function to send zone attack message, cleanup some send message functions and remove deprecated send text functions
2020-02-16 08:29:01 +00:00
Salja
22bfaa12b0 Mage 400 INTO master/434
Signed-off-by: Salja <salja2012@hotmail.de>
2020-02-16 01:59:51 +00:00
Machiavelli
21a3ee9267 [12079] Remove some redundant explicit NULL checks for pointers before delete or delete[] calls since this check is done implicitly when deleting
Signed-off-by: stfx <stfx@hotmail.de>
2012-08-03 14:30:18 +02: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
c5c09cee3c Various Cleanups (game C-E) 2012-07-19 21:45:58 +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
01b6c6b8f4 [12019] Various changes
* Add some const correctness
* Remove unused Unit::isHover() function
* Help compiler optimize code from last commit (thx to vladimir)
2012-06-25 14:54:00 +02:00
Schmoozerd
fb3a990b13 [12017] Add support for getRace() of creatures. Thanks to vladimir for input 2012-06-24 19:40:36 +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
Schmoozerd
5506b22b38 [11884] Fix missing cast from changes of 11880
Thanks to Rog360 for pointing

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-01-24 23:15:21 +01:00
Schmoozerd
71bdb8e5b6 [11880] Ensure that db saved values and values in memory are in sync
This fixes db-errors for npcs with random movement added with .npc add command.
Patch inspired by NoFantasy and MasterTomas
2012-01-20 02:58:42 +01:00
faramir118
eca3586d74 Fix some combat behaviour of NPC-Pets
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2012-01-20 00:42:59 +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
PSZ
f9a259dc44 [11850] Add additional flag SELECT_FLAG_NOT_IN_MELEE_RANGE
this allows to select targets that are not in melee range with SelectAttackingTarget

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-11-28 16:33:40 +01:00
Schmoozerd
2166621df0 [11843] More improvements to LoadCreatureAddon, Thanks to Shauren and Vladimir for pointing 2011-11-08 18:40:49 +01:00
Schmoozerd
62c4f5e6bf [11842] Add spell difficulty selection for creature*_addon auras
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-11-07 21:48:45 +01:00
Schmoozerd
fbdd79141c [11827] Implement Creature Linking via database
Thanks to Silverice for feedback!

This system interprets the content of the table `creature_linking_template`. To trigger different actions on different events of the npcs that are linked together.
Possible event/ action combinations can be taken form the flags in CreatureLinkingMgr.h::CreatureLinkingFlags
2011-10-16 13:04:58 +02:00
SilverIce
6edfcea7f0 [11826] remove no more needed CORPSE_FALLING state, move FallGround method to more appropriate place 2011-10-16 04:42:31 +03:00
SilverIce
70a6a1ce76 [11825] Implement creature offhand attack. based on patch from maxxx2021
also drop some archaic Unit's code
2011-10-16 00:01:06 +03:00
SilverIce
59f8716542 [11820] implement OrientationFixed splineflag, correct OrientationInversed flag meaning. Add possibility to play landing, liftoff animation at arrive. Thanks to TOM_RUS for AnimType research 2011-10-14 14:50:00 +03:00
SilverIce
df0715284f [11819] move SetActiveObjectState to WorldObject level 2011-10-13 20:08:49 +03:00
SilverIce
012be82c86 [11818] update creature's unit part(update spell events, auras, movement) while in death. thanks to rsa for making tests
this allows us update creature's death persistent auras, fall died creatures in natural, non hacky way

also fix the bug that creature starts waypoint movement not from begining at respawning. thanks to Grz3s for reporting
2011-10-13 15:44:12 +03:00
Schmoozerd
9c70637333 [11817] Improve db error log output for *_addon auras
This clearifies that a problem is caused by already applied auras and not double aura in *_addon table.
The double spell entry as well as the invalid spell are filtered on load.

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-10-11 17:52:11 +02:00
Schmoozerd
0eff04c161 [11793] Add more features to SelectAttackingTarget
Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
2011-09-16 20:35:26 +02:00
MaxXx2021
de54e63f7a [11781] Set walking as a default creature movement mode
Signed-off-by: SilverIce <slifeleaf@gmail.com>
2011-08-12 18:13:34 +03:00
VladimirMangos
3e0cacbdaf [11743] Fixed auction crash in case missing localization for only some items
Source crash in missing locale strings array size check before access
to it in locale structure.

Also move repeating code for access to wide used localization string arrays to ObjectMgr functions.
2011-07-19 02:34:16 +04:00
SilverIce
a7fba67225 [11732] Interrupt movement state at dying
TODO: proper solution would be update creatures while in corpse state.
This also would solve problems with death persistent auras that not get updated for died creatures
2011-07-10 22:17:08 +03:00
SilverIce
fc0eb7e9fa [11721] Simplify walk/run movement mode selection code 2011-07-08 19:30:00 +03:00
SilverIce
9d566398ad [11720] Implement spline movement subsystem
Spline movement controls movements of server-side controlled units (monster movement, taxi movement, etc).
Proper implementation of effects such as charge, jump, cyclic movement will rely on it.
However, need improve our states system before.

Technical changes:

 1. Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
 2. Precission increased. There are no more position desync issues since client's position calculation formulas used.
 3. Now possible to move by paths with multiple points, send whole path to client.
2011-07-08 17:25:13 +03:00
SilverIce
984f16aedd [11710] Don't send movements of stopped creatues
destination holder still contains info about current destination point, even when movement is disabled/stopped
as a result, creature moves somewhere on client, while stopped on server-side
2011-07-04 04:38:10 +03:00
VladimirMangos
753b0cd969 [11609] Add and use GetPrevDifficulty function.
Function return prev. difficulty in natural difficulty order for raid/dungeons/bg
2011-06-05 21:49:21 +04:00
VladimirMangos
8698ac207d [11573] Add CreatureInfo::GetObjectGuid
Also remove redundent CreatureData::GetHighGuid
2011-05-31 02:48:25 +04: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
NoFantasy
d68e8368f7 [11408] Do not ignore SHEATH_STATE_UNARMED when 0 defined in database *_addon
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-30 14:00:46 +02:00
zergtmn
2835aa5f20 [11385] Add support for static vehicle spawns
Signed-off-by: zergtmn <zerg@myisp.com>
2011-04-20 23:23:47 +06:00
Schmoozerd
5895cb38e3 [11376] Allow fallback to creature_template_addon of base entry
Use creature_template_addon from base entry when addon for difficulty_entry_N does not exist.
It is easier to create data for the exceptions rather than the general.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-17 13:31:21 +02:00
NoFantasy
2c09c11091 [11357] Replace some 0-values with UNIT_DYNFLAG_NONE
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-15 11:07:55 +02:00
NoFantasy
520f420aed [11356] Some cleanup of JUST_ALIVED for creature and add comments.
Also restore npcflags after LoadCreatureAddon.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-15 11:00:58 +02:00
VladimirMangos
6f8aa617d0 [11354] Resolve porblems with Pet regeneration timer conflict with Creature version.
* Creature regeneration code moved to new virtual function RegenerateAll
* Pet instead direct call own regeneration code overwrite now RegenerateAll

Big thanks to Vladskywolf for problem research and original patch version.
2011-04-15 02:15:29 +04:00
VladimirMangos
b4ab2b2441 [11344] Make .npc delete safe for instances and complete no static creatures code cases. 2011-04-13 19:17:14 +04:00
VladimirMangos
6c8efb4458 [11343] Check creature*_addon.auras duplicates at loading.
This already checked at apply to creature but startup check more helpful for DB devs.
Also remove use single field structure use for store addon.auras data
2011-04-13 15:27:14 +04:00
VladimirMangos
96045a86e3 [11325] Made recently added coordinates check only for debug build mode. 2011-04-08 00:12:25 +04:00
VladimirMangos
ba77d85a30 [11323] Avoid explicit use HIGHGUID_UNIT as creature high guid in guids or creature creating.
This helper change for allow have in future static spawned vehicles as `creature` table data.

Added CreatureInfo::GetHighGuid() high guid selector, and wrapper CreatureData::GetHighGuid()
for most real cases of usage. Also easy get expected guid form by CreatureData::GetObjectGuid(lowguid).

Also fixed some memory lost cases at creature spawn fail.
2011-04-07 21:15:27 +04:00
Ambal
f46f4e1b87 [11320] Check if Creature::GetRespawnCoord() function returns valid map coordinates. Invalid data might cause crashes with movement generators.
Signed-off-by: Ambal <pogrebniak@gala.net>
2011-04-06 10:53:51 +03:00
NoFantasy
889ce13264 [11316] Implement a basic system to restore default faction for creatures after changes
A new specialized function SetFactionTemporary for creatures are added. It work just like setFaction but has in addition option to set flags.
The flags determine if default faction should be restored and when; most commonly just before respawn and when reaching home after evade.

SCRIPT_COMMAND_SET_FACTION for DB scripts and ACTION_T_SET_FACTION for creature_ai_scripts are now capable of using the system (documentation updated)

The intention of the system is to be able to solve basic events that include faction changes, with the use of database only and in easier ways.

It is advised that DB devs revise current database scripts to check if changes should be made. The same goes for EventAI devs regarding ACTION_T_SET_FACTION.

Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-05 15:04:39 +02:00
NoFantasy
492dd35606 [11313] Add m_ prefix for a few values in Creature class
Signed-off-by: NoFantasy <nofantasy@nf.no>
2011-04-04 17:05:43 +02:00
VladimirMangos
b588ea9db3 [11260] Add wrapper for creature vistual item set. 2011-03-16 20:21:45 +03:00