Commit Graph

200 Commits

Author SHA1 Message Date
azazel b39b8fdd0d DB Schema/Characters: removed columns auctionhouse.item_template, character_inventory.item_template, guild_bank_item.item_entry and mail_items.item_template and created item_instance.itemEntry column instead of them.
As a side effect moved related queries to prepared statements.
As one more side effect fixed not shown and lost mail items in returned expired mail (patch by Quriq14).

--HG--
branch : trunk
2010-12-15 14:08:12 +06:00
Shauren f4581f67b8 Core: Fixed uninitialized variable warnings
--HG--
branch : trunk
2010-12-14 15:58:45 +01:00
Liberate 6be8446053 Core/Gameobjects: Fix fishing and looting specific chests which were bugged because of revision 044e466d75.
Fixes issue #5116.

--HG--
branch : trunk
2010-12-14 15:02:42 +01:00
Liberate 09f4eb9e1c Core/Gameobjects: Make a chest not lootable when it still has a respawn time, to avoid cheating using third-party software.
--HG--
branch : trunk
2010-12-14 03:58:59 +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
azazel e7eb4e22e2 Core/Mechanics: cleanup shapeshift form code (by VladimirMangos)
--HG--
branch : trunk
2010-12-09 17:03:42 +06:00
Spp 408fce1de6 Core: Some optimizations
- Declare some functions const
- Fix some mem leak
- Fix some resource leak
- Remove unused variables and functions
- Remove duplicate functions
- Reduce the scope of some variables
- Remove unused file

--HG--
branch : trunk
2010-12-06 02:07:53 +01:00
Spp e621f5fe98 Core/Dungeon Finder: Code cleanup and minor optimizations
- Extend LfgState to keep control of the state of group and players using LFG
- Move scripts to its own class and initialize only if Dungeon finder is enabled
- Updated comments to doxygen format
- Use constructor initialization list
- All variables are declared in the inner most scope
- Fix some mem leaks
- Remove no longer needed code (Cleaner)
- Normalize handler function names

--HG--
branch : trunk
2010-12-05 17:50:26 +01:00
click 28c2e270db Core/Battlegrounds: Implement power resets on arena-fight preparations (first 60 seconds before arena-fight kicks off) (Thanks to Kaelima)
Restores all player powers every 5 seconds untill arena starts (fixes possible exploit with entering arena battle with full rage or runic power)
(The 5 second timer is not 100% confirmed, as official pages only states that the power is reset after prep-time - needs feedback)
Closes issue 4805

--HG--
branch : trunk
2010-12-02 22:50:30 +01:00
click 0fde30f185 Core: Adjust packetsize for SMSG_RESYNC_RUNES - thanks to False.Genesis ( and to Svetilo12 for the heads up )
Closes issue 4943.

--HG--
branch : trunk
2010-11-28 00:40:20 +01:00
Shauren 3fa97ad538 Core/Spells: Phaseshift auras can now be stacked
--HG--
branch : trunk
2010-11-24 16:58:57 +01:00
Spp d3c9478153 Core/Groups: Add kicker and kick reason to RemoveMember
--HG--
branch : trunk
2010-11-23 20:49:36 +01:00
Machiavelli 92a7d02184 Core/Player: Invoke global cooldown when equipping relic slot items during combat.
Please report any issues you find regarding this changeset.

--HG--
branch : trunk
2010-11-21 16:48:08 +01:00
azazel 87d723405e Core/Scripts: return const modifier to Player methods back (should restore compilation for those with custom scripts).
NOTE: The main idea of original change is to allow scripts change content of message so that calling method sends modified message to client.
For example, moderating script which cuts illegal words from message.

--HG--
branch : trunk
2010-11-18 10:26:34 +06:00
azazel 4fb572015a Core/Scripts: pass message parameter by reference in OnChat methods to make it possible to be modified inside the script.
--HG--
branch : trunk
2010-11-17 18:14:35 +06: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 57c76407b0 Core/Players: Update object visibility right after adding the player to a map
--HG--
branch : trunk
2010-11-15 23:10:48 +01:00
linencloth 8f96f37c2e Core/Players: Cleanup the visibility updater
--HG--
branch : trunk
2010-11-15 23:08:02 +01:00
Shocker 48d90fab32 Misc: Some engrish fixes, thanks to ZxBiohazardZx, closes issue 4740
--HG--
branch : trunk
2010-11-14 23:46:34 +02:00
linencloth 7beb14b177 Core/Player: Delay the visibility update when setting the group to prevent crashing when a player enters the world in a group/raid.
Closes issue 4762

--HG--
branch : trunk
2010-11-13 23:27:54 +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
click 44850aab07 Core: Disallow moving currency tokens out of their hidden bag - fix by leak
--HG--
branch : trunk
2010-11-07 22:28:03 +01:00
click 7853a06912 Fix "typo" in previous commit (codingstyle)
--HG--
branch : trunk
2010-11-07 20:12:36 +01:00
click 5d4f009a87 Core/Entities: Fix exploit/crash in inventory-handling (CMSG_OPEN_ITEM) -thanks to leak
(Adds a scrutiny-based check to baghandling: don't allow placing items in bags that are not "usable" as regular bags)

--HG--
branch : trunk
2010-11-07 20:08:52 +01:00
Shauren 88ae092744 Core/Quests: Use honor multiplier as base for calculating honor rewards, not the amount of kills (fix by Nay)
--HG--
branch : trunk
2010-10-24 21:32:26 +02:00
Rat e67f04d362 Core/ConditionMgr: added CONDITION_SOURCE_TYPE_VEHICLE_SPELL, sourceGroup=creatureTemplate.entry, sourceEntry=spellEntry
--HG--
branch : trunk
2010-10-22 22:45:11 +02:00
linencloth d9d1ec3670 Core: optimize string splitting
- Mainly affects item loading performance
  - Reduces guild loading time a lot

--HG--
branch : trunk
2010-10-21 16:56:51 +02:00
azazel c0faed2251 Core/Guilds: guild code was completely refactored and rewritten.
* OOP desing and implementation;
* all the queries are moved to prepared statements;
* guild loading is optimized;
* all the possible interaction with guild's data is done inside the guild class;
* added more hooks to GuildScript class;

WARNING: Make sure you backup your characters database before applying this change (just in case).

Known problems with guilds:
* when new member is added to the guild, MOTD is not displayed for him in guild tab of social window;
* if you add item with random property to guild bank visual representation of item below it becomes wrong (it displays wrong stack number);
* packets order differs from official: currently guild bank packet traffic is twice as more than on offy.

--HG--
branch : trunk
2010-10-17 19:54:13 +06:00
Shocker c2295e86be Core/Spells: Move hacky check for spec changing to its correct location
--HG--
branch : trunk
2010-10-16 17:44:42 +03:00
Shocker 222d1cd211 Core/Misc: Also remove buffs from pet when joining arena to make sure a player won't enter with a prebuffed pet, fixes issue 4287
--HG--
branch : trunk
2010-10-16 17:34:21 +03:00
Shocker 8154f7243c Core/Arenas: Remove pet spell cooldowns on arena join too, fixes issue 1868
--HG--
branch : trunk
2010-10-16 17:01:01 +03:00
linencloth ae213dd580 Core: Improve constant channel handling
- Implement area restrictions
  - Disable constant channels in arenas
  - Implement city requirement
- Implement global constant channels
- Fix some packets

--HG--
branch : trunk
2010-10-16 12:59:53 +02:00
Shocker 66dec6d86f Core/Misc: Implement config option for energy regeneration rate, patch by Ramus, closes issue 4394
--HG--
branch : trunk
2010-10-12 21:05:37 +03: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
Shauren 324de6fb4c Core: Added some anti-WPE filter checks to prevent putting non-empty bags into other bags/gbank/mail/auction, original patch from mythcore
Core: Changed inventory saving - will no longer abort operation at single item fail

Closes issue #1994.

--HG--
branch : trunk
2010-10-09 17:36:53 +02:00
QAston e5e53498ce Core/Spells:
- Add more descriptive enumerator of procflags - now clearly pointing out that proc flags are dependant to the spell dmg class of the spells causing procs.
 - Define and implement PROC_FLAG_DONE_MAINHAND_ATTACK.

--HG--
branch : trunk
2010-10-08 19:17:49 +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 a67d7c9afd Copyright header updates - part 3... (and some whitespace cleanups)
--HG--
branch : trunk
2010-10-07 14:00:52 +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
_manuel_ 91858c4ff8 Core: Fixed compile.
--HG--
branch : trunk
2010-10-01 21:24:50 -03:00
_manuel_ dfa401faf6 Core/Quests: Modified Quest System to support DF quests, the will work at the same time with daily quests but in parallel; in this way they will not count in the daily quests limit. Again, thanks to Spp & Gyullo.
--HG--
branch : trunk
2010-10-01 20:32:00 -03:00
Rat 395df76860 Core/Commands: added .debug areatriggers
-if turned on it will print the trigger id to chat if you get near it

--HG--
branch : trunk
2010-10-01 00:07:14 +02:00
Spp e27976102d Core/: Fix warnings
--HG--
branch : trunk
2010-09-28 14:48:17 +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
Xanadu 781592d63a Core/Spells: * Removed special handling of SPELL_AURA_ABILITY_IGNORE_AURASTATE, now handled by the proc system (again).
* Fixed Fingers of Frost buff display. Closes issue #3324.

--HG--
branch : trunk
2010-09-27 20:30:47 +02:00
Shocker ede2a1c5ed Core/Quests: Make sure itemcount doesn't get to be negative.
Since this is an old issue and probably there are various entries with huge values as itemcounts already, a cleanup must be done before changing structure of character_queststatus which was done in r9be097c482, thus I'll include the SQL cleanup in that revision's .sql file or MySQL will thrown an error regarding out of bounds values

--HG--
branch : trunk
2010-09-27 02:57:01 +03:00
Shocker 894b2081b3 Core/DB: Adjust max values for some columns in character_queststatus
--HG--
branch : trunk
2010-09-27 00:38:22 +03:00
Shauren 2e2951d037 Core/Players: Fixed action bar issues when changing active spec
--HG--
branch : trunk
2010-09-26 21:15:15 +02:00
click 461590832a Core: Generic cleanup (tab2spaces/whitespace removal)
--HG--
branch : trunk
2010-09-25 22:03:57 +02:00