Commit Graph

190 Commits

Author SHA1 Message Date
Shauren ca280dbe05 Core/Loot: Only 3 items of the same entry can drop on 25 man raid difficulties and 1 everywhere else (non-raid or 10 man) 2013-02-13 20:24:23 +01:00
Aokromes 134785f7f1 Core/Log: Change an error to contain DB table guid instead of low guid
Signed-off-by: Nay <dnpd.dd@gmail.com>
2013-01-16 01:17:13 +00:00
Vincent_Michael cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Subv 3d3a8107e0 Core/Entities: Account for creatures that are spawned below ground level when adding flying flags. (Triggers, mostly) 2012-12-29 14:23:23 -05:00
therzok 5c8c458d60 *Fixing a typo. 2012-12-29 21:14:12 +02:00
Subv 3ad9dafdb6 Core/Entities: Update movement flags for flying/swimming creatures on Creature::Update 2012-12-29 04:01:55 +01:00
Subv 873aa5f2a7 Core/Movement: Do not set movement flags for creatures based only on their InhabitType, check if they are actually on air/water. newline. Should allow us to fix some problems on ICC and the mmaps branch. 2012-12-27 19:31:34 +01:00
click aa3980c744 Core: Remove tabs, fix whitespace and fix nonPCH properly (5am, too late for this stuff...) 2012-12-17 05:39:04 +01:00
thesensei ed4bf13c44 Core/Creature: Update template - reinitialize spell bar for vehicles
* update template didn't change spell bar for players if on vehicle that updates it's template, initialize spells was needed
	* combined with faction changing, since when update is called player faction is ignored and it should be changed to his (based on sniffs)
	* the idea of this automated check inside fix SAI problems mainly, because there you have nothing to use to reinitialize the bar - closes #5254
2012-12-17 02:54:59 +02:00
CeIa b87cc31106 Scripts/Events/Achievement: fix 'Out With It'
Credits to @darkman1983

Closes #8211
Closes #8126

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-12-14 01:23:53 +00:00
MrSmite 777b287dff PetAI - Overhaul / bug fix
* Aggressive pets now use aggro radius check based on level diff of target
  * Aggro radius limited to max 45 yards (per wowwiki)
  * Pets no longer "dance" when fighting a creature
  * Pets returning will defend themselves (if not passive) if owner didn't click "follow"
  * Pets at stay will properly pick up their owner's attackers that pass within range
  * Fix "no empty line at end of file" warning in PetAI
  * Fix typo in GetAggroRange()
  * Fix spell "Eyes of the Beast" - player can move pet freely
  * Code style cleanup

  * Update commit comment

Closes #8398, #7455
2012-12-07 22:13:57 -05:00
Spp 2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
kaelima fc974d6fbe Core/Movement: Remove deprecated method Creature::AI_SendMoveToPacket. 2012-11-23 20:18:55 +01:00
Spp b5c9ab8802 Core/Misc: Reduction of header dependencies - Step II 2012-11-20 12:30:30 +01:00
Spp 013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Spp 380db44583 Core/Utilities: Use generic templates with AddPct, ApplyPct and CalculatePct 2012-10-02 12:17:42 +02:00
Vincent-Michael 06eff1644d Core/Vehicles: Fix warnings 2012-09-10 15:44:12 +02:00
Nay 21d43781ac Tabs to spaces... 2012-09-07 03:33:16 +01:00
Nay 340dc33b52 Fix some code style issues in previous PR merge 2012-09-06 19:59:27 +01:00
e 98f5d4ef4a [Core, Creature] Implement Creature/Pet Interrupts 2012-09-04 23:04:59 -04:00
kaelima bdfae83898 Core/Creature: Added DB support for UNIT_FIELD_FLAGS_2. Thanks cyberbrest
- Added more flags to UnitFlags2 enum (Thanks wpp)
2012-08-30 04:52:56 +02:00
Spp 55ce180f28 Core/Logging: Add Asyncronous logging with Loggers ("What to log") and Appenders ("Where to log") system. Will allow to select to full log some parts of core while others are not even logged.
- Logging System is asyncronous to improve performance.
- Each msg and Logger has a Log Type and Log Level assigned. Each msg is assigned the Logger of same Log Type or "root" Logger is selected if there is no Logger configured for the given Log Type
- Loggers have a list of Appenders to send the msg to. The Msg in the Logger is not sent to Appenders if the msg LogLevel is lower than Logger LogLevel.
- There are three (at the moment) types of Appenders: Console, File or DB (this is WIP, not working ATM). Msg is not written to the resource if msg LogLevel is lower than Appender LogLevel.
- Appender and Console Log levels can be changed while server is active with command '.set loglevel (a/l) name level'

Explanation of use with Sample config:

Appender.Console.Type=1       (1 = Console)
Appender.Console.Level=2      (2 = Debug)

Appender.Server.Type=2        (2 = File)
Appender.Server.Level=3       (3 = Info)
Appender.Server.File=Server.log

Appender.SQL.Type=2           (2 = File)
Appender.SQL.Level=1          (1 = Trace)
Appender.SQL.File=sql.log

Appenders=Console Server      (NOTE: SQL has not been included here... that will make core ignore the config for "SQL" as it's not in this list)

Logger.root.Type=0            (0 = Default - if it's not created by config, server will create it with LogLevel = DISABLED)
Logger.root.Level=5           (5 = Error)
Logger.root.Appenders=Console

Logger.SQL.Type=26            (26 = SQL)
Logger.SQL.Level=3            (2 = Debug)
Logger.SQL.Appenders=Console Server SQL

Logger.SomeRandomName.Type=24 (24 = Guild)
Logger.SomeRandomName.Level=5 (5 = Error)
Loggers=root SQL SomeRandomName

* At loading Appender SQL will be ignored, as it's not present on "Appenders"

* sLog->outDebug(LOG_FILTER_GUILD, "Some log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomName is found but it's LogLevel = 5 and Msg LogLevel=2... Msg is not logged

* sLog->outError(LOG_FILTER_GUILD, "Some error log msg related to Guilds")
  - Msg is sent to Logger of Type LOG_FILTER_GUILD (24). Logger with name SomeRandomeName is found with proper LogLevel but Logger does not have any Appenders assigned to that logger... Msg is not logged

* sLog->outDebug(LOG_FILTER_SQL, "Some msg related to SQLs")
  - Msg is sent to Logger SQL (matches type), as it matches LogLevel the msg is sent to Appenders Console, Server and SQL
    - Appender Console has lower Log Level: Msg is logged to Console
    - Appender Server has higher Log Level: Msg is not logged to file
    - Appender SQL has lower Log Level: Msg is logged to file sql.log

* sLog->outDebug(LOG_FILTER_BATTLEGROUND, "Some msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). As Logger has higher LogLevel msg is not sent to any appender

* sLog->outError(LOG_FILTER_BATTLEGROUND, "Some error msg related to Battelgrounds")
  - Msg is sent to Logger root (Type 0) as no Logger was found with Type LOG_FILTER_BATTLEGROUND (13). Msg has lower LogLevel and is sent to Appender Console
    - Appender Console has lower LogLevel: Msg is logged to Console
2012-08-03 14:20:18 +02:00
dr.skull b5a072855e Fix added check for IsImmunedToSpell
Signed-off-by: dr.skull <dr.skull@centrum.sk>
2012-06-17 23:19:32 +02:00
dr.skull 3f8efb21cd add IsEffect() check to correct IsImmunedToSpell
Signed-off-by: dr.skull <dr.skull@centrum.sk>
2012-06-17 02:23:47 +02:00
Shauren c7775c8d72 Core/Maps: Moved object respawn time storage from global to map level. This removes unneccessary locking since all objects run within its map's thread. 2012-06-07 23:20:57 +02:00
Vincent-Michael ab77e597b1 Add function for SetObjectScale
Author: NoFantasy
Source: Mangos
2012-05-26 23:14:57 +02:00
Elron103 881138553b Core/Spells: Fix immunity checking for creatures (i.e. Mind Control) 2012-05-18 22:15:21 +02:00
Malcrom 5709929d2b Core/Threat: Fix by faq.
Turning gm on, now drops threat.
Dead mobs no longer holds threat on player.
Also fixed some Engrish.
2012-05-13 11:33:42 -02:30
MacWarrior 58b05da8df Fix creature's save 2012-05-04 16:42:23 +03:00
Shauren 1851a2e9e3 Scripts: Replaced calls to ForcedDespawn with DespawnOrUnsummon (calls appropriate AI hooks in case of temporary summons) and made ForcedDespawn private 2012-04-24 16:53:37 +02:00
Shauren 3c2dd7c5ed Scripts/Ulduar: Algalon the Observer 2012-04-19 23:19:27 +02:00
Shauren bec761a3e0 Core/Creatures: Set melee sheath as default only for creatures that do not have creature_addon data 2012-04-18 12:44:56 +02:00
leak c6cbe4c77c Core/DBLayer: Convert PAppend() queries to prepared statements No.1 2012-03-25 16:25:06 +02:00
Subv 56fac5e1af Memory: Get rid of some memory leaks, converted FormationMgr back to singleton 2012-03-25 09:25:28 -05:00
Shauren 479c0976ab Core/Creatures: Properly initialize m_zoneScript when it depends on zone id (OutdoorPvP/Battlefield) and fixed z offset for hovering creatures at creation 2012-03-23 00:48:32 +01:00
Machiavelli 48799f3376 Core/Units: Fix movementflag apply for flying/hovering creatures on respawn 2012-03-18 11:35:33 +01:00
Gyx 1e94ab8d51 Core/Game: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-17 20:13:37 +08:00
Machiavelli 7d60290c2e Core/Units: Offset z coordinate only if MOVEMENTFLAG_HOVER is present, not MOVEMENTFLAG_DISABLE_GRAVITY.
(Remnant from an early incorrect version of my UNIT_FIELD_HOVERHEIGHT patch)
2012-03-15 10:16:08 +01:00
Machiavelli 03a24a84e4 Core/Units:
- Implement UNIT_FIELD_HOVERHEIGHT (requires DB data). This field, sent in update object packet, will determine the height at which a creature hovers if it has movementflag_hover applied. Note that hovering will now update the server-sided z-coordinate by the value of this field, and that all subsequent positional updates to the client will need to send z coordinate MINUS the hover height offset, or the hoverheight will be visually doubled client side.
- Correct our usage of movementflag_flying, movementflag_can_fly, movementflag_hover and movementflag_disable_gravity (previously levitate), and how they relate to InhabitType in the database. This fixes "flying creatures on steroids" bug (wings flapping too fast), and potentially a lot of visual issues in AI scripts. Note that a lot of scripts still set wrong movementflags, these need to be fixed on a case by case basis.
- Send correct packets for SPELL_AURA_FEATHER_FALL, SPELL_AURA_WATER_WALK and SPELL_AURA_HOVER apply/unapply.
- Send correct packet contents for movement update in Unit::SetSpeed.
- Misc. cleanup in affected scripts.
2012-03-12 00:53:45 +01:00
Spp f1949b20a6 Some random cleanup here and there 2012-03-09 13:42:52 +01:00
Spp d38bc3a178 Core: Rename GetCreatureInfo to GetCreatureTemplate and minor cleanup here and there 2012-02-27 14:58:47 +01:00
Shauren dc28b92415 Core: Random cleanup + compile fix 2012-02-23 13:01:16 +01:00
Shauren d2567a9f2f Core/Entities: Removed unused variable 2012-02-16 21:46:37 +01:00
Spp 03c34ee507 Fix a lot of warnings 2012-02-16 13:56:28 +01:00
Subv 9791bb599a Merge pull request #5160 from TrinityCore/dynamic_vmaps
Added Dynamic Vmaps, RE-EXTRACT YOUR VMAPS
2012-02-09 11:17:05 -08:00
Subv2112 93d199f043 Core/Collision: Ported dynamic line of sight patch by Silverice from MaNGOS and
added lots of improvements
Please re-extract vmaps
2012-02-09 13:58:22 -05:00
Subv2112 69ab572786 Codestyle/Logs: Add more detailed information in Creature::Respawn, replacing the useless previous log
Signed-off-by: Subv <s.v.h21@hotmail.com>
2012-02-03 19:37:28 -05:00
QAston c7ea952a47 Core/Entities: Rename UNIT_FLAG_OOC_NOT_ATTACKABLE and UNIT_FLAG_PASSIVE to UNIT_FLAG_IMMUNE_TO_PC and UNIT_FLAG_IMMUNE_TO_NPC respectively. New names tell much more about what those flags do. 2012-02-03 18:46:05 +01:00
Shocker 08be716ef8 Core/Misc: Rename UNIT_STAT_* enums to UNIT_STATE_* 2012-02-03 19:02:17 +02:00
Machiavelli dbbac0bdaa Core/Movement: 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:

* Added linear, catmullrom and bezier3 splines which based on client's algorthims. They can be reused for proper transport position interpolation.
* Precission increased. There are no more position desync issues since client's position calculation formulas used.
* Now possible to move by paths with multiple points, send whole path to client.

--
Original author of research and implementation: SilverIce. Massive kudos.
Original port for Trinity (ref #4629) Chaplain and Venugh
With the following incremental fixes during my review:

- Restore flightmaster end grid pre-loading
- Fix uninitialized Creature::m_path_id
- Add missing trinity_string entries for .movegens command
- Fix a bug in WaypointMovementGenerator that would trigger unexpected pausing at waypoints for various amounts of time

Known issues:
- Errors like WaypointMovementGenerator::LoadPath creature XXX (Entry: YYYYY GUID: ZZZZZZ) doesn't have waypoint path id: 0.
This is caused by bad DB data. This commit didn't "break" it.

Do not forget to re-run CMake before compiling.
2012-01-14 15:36:07 +01:00