Commit Graph

79 Commits

Author SHA1 Message Date
Shauren 0f34df6e1a Scripts/Icecrown Citadel: Added support for weekly quest "Deprogramming" 2011-02-18 19:48:47 +01:00
Azazel 4dc1eaa47c Core/Misc: improve error log messages by adding more info. Specially for Aokromes. 2011-02-17 19:47:08 +06:00
Manuel Carrasco 6b2ffc9039 Core/GuardAI: Guards don't evade if the target casts Vanish and also can detect players with Feign Death.
Core/Scripts: Moved scripts from ScriptedGuardAI to guards.cpp
Core/Creature: Removed custom npcflags UNIT_NPC_FLAG_GUARD (now moved to flag_extras) and UNIT_NPC_FLAG_OUTDOORPVP (not used)

Thanks to Kaelima, Xanadu, Shauren and linencloth.

Signed-off-by: Manuel Carrasco <manue.l@live.com.ar>
2011-02-10 22:36:35 -03:00
Shauren 4a55030f38 Core/Creatures: Flag dungeon bosses for quicker lookups for related encounters 2011-02-09 16:28:56 +01:00
Shauren 00b93c508f Core/Creatures: Fixed typo in difficulty template selection 2011-02-07 13:11:45 +01:00
VladimirMangos b5b9aa9647 Core/Instances: Fixed creature difficulty templates for non-battleground maps
Signed-off-by: Shauren <shauren.trinity@gmail.com>
2011-02-04 15:45:59 +01:00
Manuel fb950c00ee Core/ZoneScript: Implemented OnCreatureDeath function.
Signed-off-by: Manuel <manue.l@live.com.ar>
2011-01-24 18:56:06 -03:00
Shauren 9c0cd63e93 Core/Scripts: Added wrapper method for despawning creatures DespawnOrUnsummon 2011-01-02 21:33:37 +01:00
Machiavelli 957c69de83 Update copyright note for 2011.
Happy new year.
2011-01-01 15:01:13 +01:00
Machiavelli 06955a1113 Core/Entities: Fix guid lookup for linked respawn system
--HG--
branch : trunk
2010-12-25 02:22:35 +01:00
Machiavelli c05ed659cb Core/Entities:
- Rename creature_linked_respawn to linked_respawn
- Update functionality: add field ´linkType´.
** 0 = creature respawn dependant on creature (default)
** 1 = creature respawn dependant on gameobject
** 2 = gameobject respawn dependant on gameobject
** 3 = gameobject respawn dependant on creature

--HG--
branch : trunk
2010-12-24 18:55:50 +01:00
Machiavelli f690338de1 Core/CreatureAI: Add virtual bool CanRespawn().
This method will be checked on Creature::Update with deathstate ¨DEAD¨, and allows inherited scripts to manipulate respawn behaviour based on scripted events.

--HG--
branch : trunk
2010-12-24 16:18:23 +01:00
Shauren 928443d899 Core: Removed more operator workarounds for ACE_Singleton (missed previously because of inconsistent naming)
--HG--
branch : trunk
2010-12-23 23:25:44 +01:00
Xanadu cfa26522ad Core: Fixed occasional wrong order of async operations at respawn time saving. Closes issue #5239.
DB schema: Sorted out a discrepancy in respawn time column format.

--HG--
branch : trunk
2010-12-23 05:49:23 +01:00
Shauren 0f3b9019a8 Core: Get rid of dirty operator workaround for ACE_Singleton class implementation
--HG--
branch : trunk
2010-12-22 21:25:23 +01:00
Shauren 7b4e1c6387 Core/ObjectMgr: Static members are no longer accessed through singleton
--HG--
branch : trunk
2010-12-22 20:23:47 +01:00
Shauren 82f45966fc Core/Unit: Renamed addUnitState/hasUnitState/clearUnitState to AddUnitState/HasUnitState/ClearUnitState
Core/Vehicles: Allow the vehicle to always damage the passenger (removed unneded dbc hacks from scripts)

--HG--
branch : trunk
2010-12-17 13:43:24 +01:00
Shauren 58a9b15443 Core: Fixes some warnings
Core/SmartAI: Fixed DamageTaken and DamageDealt hooks

--HG--
branch : trunk
extra : rebase_source : 062f1c68cd1d318d192b294a493db17a1943bee2
2010-12-14 22:45:23 +01:00
click 2642894342 Core: Add new system for parallelizing client packet processing. Handle WorldSession updates in Map::Update() where we are safe to proceed. Patch by Ambal.
(And clean up tabs and whitespace while rummaging around in there)
Closes issue 5084.

--HG--
branch : trunk
2010-12-13 22:37:56 +01:00
azazel d2d62eab50 Cleanup: implemented helper methods for manipulating percentage calculation and used it where appropriate (plus fixed some other warnings).
NOTE: Initially I just wanted to fix some warnings, but noticed that there is no common method for percentage calculation and various formulas are used many time in the code making it difficult to read and understand what the code actually does. So, I introduced several template methods for calculating percent values and adding those values to the original base. I replaced all the raw calculations throughout the code where found, but I could have missed something or could have made a mistake. So, please report any strange behaviour after this commit.
If you ask me why I did it: for the sake of consistency and exact understanding what code means. If you see CalculatePct method, you clearly understand, that it find the value of x percent of y. And you can easily express, for example, spell behviour "reduces smth by x%" by the means of a method instead of recalling school maths.

--HG--
branch : trunk
2010-12-11 20:37:38 +06:00
leak 6fe19b5a86 Core/Scripts: Split OnCreatureCreate() and OnGameObjectCreate() into two virtual functions each.
Note to scripters: be aware that you will need to hook into the Remove functions if you want to do stuff at GO/creature removal.
Closes issue 5011.

--HG--
branch : trunk
2010-12-05 18:04:10 +01:00
Spp 25ac835507 Core/Groups: Move all function definition from .h to .cpp
Core/Groups: Remove Group.h dependency from any .h file

--HG--
branch : trunk
2010-11-29 07:50:31 +01:00
click 6ebaad1847 Core: Add validation-test for adding creatures to the world - fix by Paradox
Closes issue 4807

--HG--
branch : trunk
2010-11-16 14:00:47 +01:00
linencloth 8fae0c176d Core/Units: Rename and change Get/SetVisibility to use a bool value instead of an unnecessary enum
Also replace some SetVisibility hacks to directly call UpdateObjectVisibility

--HG--
branch : trunk
2010-11-16 01:13:04 +01:00
linencloth e72106c5e9 Core/Creatures: Fix visibility of spirit guides
Closes issue 4781

--HG--
branch : trunk
2010-11-14 22:24:00 +01:00
linencloth 6b3204e441 Core/Creatures: Do not regenerate the health of evading creatures, it should happen only while normal pathing or at home
--HG--
branch : trunk
2010-11-14 04:20:32 +01:00
linencloth bf888285aa Core:
- Redesigned stealth and invisibility handling
  - Implemented the handling of multiple stealth types
- Implemented fake inebriation
- The message deliverer no longer sends packets from a non-visible source
  - The server won't send that much garbage which just takes bandwith
  - It won't be possible to use cheats to detect invisible objects
- Removed a lot of checks for the Z-coord
  - Fixes visibility problems happening while flying
- Limited the grid activation range of creatures to use less resources
- Implemented Shroud of Death
- Implemented increased visibility range for active objects
- Removed visibility check at spellhit (only sanctuary effects should prevent it)
(And a lot of other changes...)

Closes issue 4208
Closes issue 3049
Closes issue 2097
Closes issue 2198
Closes issue 2384
Closes issue 2197
Closes issue 2319

--HG--
branch : trunk
2010-11-13 17:18:09 +01:00
Rat c9cf2f059f Core/AI: delay all AI()->Respawn() hooks by 1 server tick, this way when creatures are just got created they will successfully find other objects in scripts at spawn time
--HG--
branch : trunk
2010-11-03 18:33:47 +01:00
linencloth 07fa1bcbdf Core/Creature: Implement FarTeleportTo (teleport to an other map)
Core/Transport: Cleanup and optimize transport and passenger handling
- Only transports will be active objects
  - Reduced cpu and memory usage
- Using FarTeleportTo for creature passengers at transport teleportation
  - Creatures won't be recreated on teleport

--HG--
branch : trunk
2010-10-24 02:55:50 +02:00
Shauren 91a97c7b83 DB-Schema/World/creature: Added possibility to override npcflag, unit_flags, dynamicflags in creature table
Core/Player: Fixed bad query in previous revision

--HG--
branch : trunk
2010-10-09 17:52:00 +02:00
click f0c4241ea4 Remove the accidental additions of CRLF-crap from the header updates
--HG--
branch : trunk
2010-10-07 15:35:36 +02:00
click 8ea4b32fab Update copyright headers (following the same standard in all files = good)
--HG--
branch : trunk
2010-10-07 12:41:56 +02:00
Shocker 78803c9f09 Magic numbers cleanup:
- Replace many magic numbers with constants
- Use enum for vehicle flags/seat flags
- Correct structure for ItemRandomSuffixEntry

--HG--
branch : trunk
2010-09-28 08:21:51 +03:00
linencloth 8622446ab9 Core/Creature: Despawn skinned creatures.
Fixes issue 4047.

--HG--
branch : trunk
2010-09-17 15:16:26 +02:00
linencloth 7708e2ea06 Core/Creature: Reset loot recipient group on respawn.
Fixes issue 4051.

--HG--
branch : trunk
2010-09-17 15:10:10 +02:00
linencloth d8a854d6e0 Core: Cleanup locale handling.
It also fixes the recent problem of strange strings.

--HG--
branch : trunk
2010-09-17 07:04:29 +02:00
azazel a034ac9937 Scripts: enhance SCRIPT_COMMAND_TALK command to make Players talk (add 0x1 bit to datalong2 and command will expect Player instead of Creature for talking).
--HG--
branch : trunk
2010-09-16 13:28:16 +06:00
linencloth 9739bea487 Core/Loot: Reimplement the proper check for loot recipient to prevent rewarding loot without tagging the creature by the player.
Also fix the related skinning problem, and do not set the skinnable flag for creatures without any loot recipient.

--HG--
branch : trunk
2010-09-15 17:44:56 +02:00
linencloth 91d2c1d64c Core/Creature: Initialize the recipient group for creatures.
It fixes creatures appearing as tagged units, and may also prevent crashing which could happen by using the bad pointer.

--HG--
branch : trunk
2010-09-15 17:30:42 +02:00
Shauren a72fc44f9a Core/Loot: Reverted part of revision fe39cb058b75, fixes skinning loot
Core/Loot: Some logic fixes for group looting
Buildsystem/MSVC: Fixed compile warning
Config: Added missing description for Rate.Drop.Item.ReferencedAmount

Closes issue #4004.

--HG--
branch : trunk
2010-09-15 13:44:40 +02:00
linencloth ec5edaf6bf Core/Creature: Initialize the creature's default movement generator on respawn.
Fixes creatures which are moving by default, but not continuing it after respawning.

--HG--
branch : trunk
2010-09-15 06:23:25 +02:00
linencloth 356a263059 Core/Creature: Fix creature respawn time in unloaded/inactive grid cells.
Fixes issue 1865.

--HG--
branch : trunk
2010-09-15 06:22:54 +02:00
linencloth 6bdfc77b42 Core/Player: allow dead players to see dead creatures near their corpses
--HG--
branch : trunk
2010-09-14 02:57:53 +02:00
click a6efc4dad5 Core/Loothandling: Make sure "pet-only"-kills doesn't drop loot (when pet is killing a creature on its own without any assistance from player)
(Also fix unintended typo from r701f212a00)

--HG--
branch : trunk
2010-09-13 22:49:20 +02:00
Shauren 6d0a031a77 Core/Quests: Some cleanup in quest relation accessing
--HG--
branch : trunk
2010-09-13 13:18:27 +02:00
click bf664b7a44 Cleanup/Core: Remove whitespace and tabs
--HG--
branch : trunk
2010-09-12 01:40:27 +02:00
Spp 405f312918 Core: Fix more warnings
--HG--
branch : trunk
2010-08-30 15:25:15 +02:00
Shocker 2748f86bdb Fix crash when using a pool template with an entry > 65535, fixes issue #3632
--HG--
branch : trunk
2010-08-26 06:49:31 +03:00
azazel 341e6303ef Core:
* add helping methods for manipulating unit's health and use it where applicable
* fix some conversion warnings and cleanup code (formatting, CRLF, tabs to spaces)

--HG--
branch : trunk
2010-08-26 01:20:57 +06:00
silinoron 8649bee17f Replace World::getConfig with World::getFloatConfig, World::getIntConfig, and World::getBoolConfig.
Also fix a warning from a previous commit.

--HG--
branch : trunk
2010-08-23 19:56:47 -07:00