Commit Graph

237 Commits

Author SHA1 Message Date
Pitcrawler 660f7e72be DB/SAI: Fix some Howling Fjord gossips
Closes #4973
2012-11-11 12:28:31 +01:00
Spp d2ba73d97f Core/Misc: Proper fix for previous commit (c5c8e38 - check race change before perfoming faction-change actions)
Core/Misc: tab to spaces and remove trailing whitespaces
2012-10-29 12:28:12 +01:00
Subv 55892048ef Merge pull request #8127 from Gacko/childrens_week
Core/DB: Children's Week
2012-10-25 07:43:02 -07:00
Spp 013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Spp 663db1cee3 Core/Misc: Add default count param to HasItemCount 2012-10-23 13:11:57 +02:00
Gacko 9c4cf9b39c Core/DB: Children's Week 2012-10-21 14:33:20 +02:00
Spp d0334bf948 Core/Dungeon Finder: Some optimizations.
- Store teleport coordinates to avoid recalculations each time someone has to be teleported
- Correct teleport error msg when player is charming or using vehicle
- Internal changes in storage types
- Proper code for missing achievement lock type
- Better debug msgs
- Trying to get rid of "Player*" and "Group*" inside LFGMgr as much as possible (Step 1)
2012-10-18 09:15:10 +02:00
MrSmite d28a62e579 Cleanup PetAI, remove unnecessary and broken JustDied(). Closes #7242
Thanks to Oiler2112 for suggestions and testing.
2012-10-12 16:48:33 -04:00
Kandera f120d87427 Core/Scripts: add another missing include. 2012-10-05 09:45:02 -04:00
Kandera 6524e9f265 Core/Scripts: add missing include from 42c047bebc 2012-10-05 09:23:20 -04:00
kandera 42c047bebc Merge pull request #7839 from Warpten/soulwell
Core/Spells: Fixed Soulwell charges removal on use.
2012-10-05 06:04:24 -07:00
Spp 7831ecdb18 Core: "Initial support for C++11 compilers" 2012-10-02 15:06:19 +02:00
Warpten a2c9c4098a Core/Spells: Fixed Soulwell getting two charges removed (or more) per click. 2012-09-22 21:28:37 +02:00
Nay abbb896cfb Core: Fix many "errors"/warnings and coding style (2)
Scripts; also reverted a change to AuthSocket

Errors were found using Cppcheck, open-source static analysis tool
2012-08-30 22:44:03 +01:00
Nay 542521a026 Scripts/Achievements: Remove a duplicated achievement script 2012-08-20 23:43:12 +01: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
Vincent-Michael 634b3645d5 Core/Misc: Use proper headers to optimize compile 2012-07-30 05:38:40 +02:00
Subv ae13832efc Merge pull request #6490 from Vincent-Michael/notEvenAScratch
Battleground/Strand of the Ancients: Fix Achievement: Not Even a Scratch
2012-07-01 14:10:36 -07:00
Shauren e0997874f5 Core/SpellScripts: Changed OnUnitTargetSelect hook to OnObjectAreaTargetSelect, it will now work with WorldObject instead of only Units and call it even for empty target lists 2012-06-29 21:53:35 +02:00
Malcrom 830d1cd0bc DB/Core/Gossip: Add Gossip for Alliance & Horde bonfires, fix gameobject faction, fix quest racerequirements, fix spell 45437 to be cast upon bonfire.
Spawning left to do.
2012-06-24 19:45:58 -02:30
Malcrom 3e3a940a1c DB/SAI: Fix for Quest 11317 & 11322 "The Cleansing" 2012-06-06 18:54:13 -02:30
Malcrom ee194a4f43 Core/Scripts: Addition to previous commit. 2012-06-06 00:08:07 -02:30
Malcrom f08bc7d502 Core/Scripts: Script for Frostblade Shrine to start The Cleansing quest.
Quest is not yet scripted.
2012-06-05 23:32:09 -02:30
kaelima fa1375b7d6 Script/Shadowfiend: Use PetAI for shadowfiends, fixes shadowcrawl autocasting 2012-06-03 23:12:21 +02:00
Malcrom 8cc19196a6 Core/script: Informed by Kaelima this line is handled by dbc and not required. 2012-06-01 12:34:08 -02:30
Malcrom dfbd7a820b Core/scripts: Add generic script to prevent cannon movement. 2012-06-01 12:23:55 -02:30
Vincent-Michael 890c7e64e1 Battleground/Strand of the Ancients: Fix Achievement: Not Even a Scratch 2012-05-09 23:51:58 +02:00
kaelima cb36825a3a Script/Wormhole: Correct randomize logic for underground option 2012-05-09 13:49:49 +02:00
kaelima 7d561c884e Correct typo from 1af30a9ea2 2012-05-09 02:25:46 +02:00
kaelima 1af30a9ea2 Scripts/Wormhole: Add rare 6th option to "Underground". Fixed some teleport positions (from sniffs)
And made some random cleanup for npc_shadowfiend and npc_lightwell
2012-05-09 01:48:42 +02: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
Xanvial 98f9472715 Convert script of npc tabard vendor to SAI and add missing tabard recovery 2012-04-22 08:40:22 +07:00
Kandera 413cfac953 Core/NPC: add essence infused moonstone, key to the focusing iris (and hc) to the list of keys gettable from locksmith npcs. (per aokromes) 2012-04-16 11:40:29 -04:00
Gyx a1c4786ba0 Core/Script: Code style and some rewriting.
MoveInLineOfSight(Unit* unit) -> MoveInLineOfSight(Unit* who)

Signed-off-by: Gyx <2359980687@qq.com>
2012-04-01 19:56:41 +08:00
Gyx 391d68be20 Core/Script: Code style.
WaypointReached(uint32 i) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 uiPointId) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*point*/) -> WaypointReached(uint32 /*waypointId*/)
WaypointReached(uint32 uiI) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*i*/) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 uiWPointId) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*wp*/) -> WaypointReached(uint32 waypointId)
WaypointReached(uint32 /*point*/) -> WaypointReached(uint32 waypointId)

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-29 15:44:24 +08:00
Gyx e050945c91 Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-28 11:13:37 +08:00
Gyx 5cb16b65fc Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-17 17:54:48 +08:00
Gyx 7877eae6ba Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-17 12:17:15 +08:00
Gyx d8b4bc590a Core/Script: Code style and remove unused core.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 21:41:15 +08:00
Gyx e5afa4a950 Core/Script: Clean-Up in Scripts.
Item* pItem -> Item* item

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 20:57:13 +08:00
Gyx cd38e7df2b Core/Script: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 20:31:23 +08:00
Gyx bef1b0c402 Core/Script: Code style.
Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 19:40:57 +08:00
Gyx 76c18e00c7 Core/Script: Clean-Up in Scripts.
GameObject* pGO -> GameObject* go

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 19:28:10 +08:00
Gyx fcbb222aca Core/Script: Clean-Up in Scripts.
Creature* c -> Creature* creature
Creature* _Creature -> Creature* creature
Creature* Creature -> Creature* creature

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-16 19:21:47 +08:00
leak 2a5caef4a6 Revert "Core: more more cleanup" - Build test anyone?
This reverts commit 20cd4c71ee.
2012-03-14 18:51:51 +01:00
thomas33 20cd4c71ee Core: more more cleanup 2012-03-14 17:51:11 +01:00
Gyx e8f414e143 Core/Script: Clean-Up in Scripts.
Creature* c -> Creature* creature

Signed-off-by: Gyx <2359980687@qq.com>
2012-03-14 09:20:36 +08: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
frozenarmor 609728a17b Update forgotten copyright-headers for 2012.
Signed-off-by: frozenarmor <venom.victorios@gmail.com>
2012-03-11 00:52:06 +05:00
Spp f495e0efe4 Warning fixes and some random cleanup here and there 2012-03-07 14:09:18 +01:00