Commit Graph
70 Commits
Author SHA1 Message Date
Spp 46f0674e23 Code Style (game + scripts only):
">=" --> " >= " (when needed)
"  >=" --> " >="
">=  " --> ">= "
"<=" --> " <= " (when needed)
"  <=" --> " <="
"<=  " --> "<= "
" ==" --> " =="
"==  " --> "== "

--HG--
branch : trunk
2010-04-07 23:56:35 +02:00
Spp 2454c290b8 Code Style (game + scripts only):
"==" --> " == " (when needed)

--HG--
branch : trunk
2010-04-07 23:25:02 +02:00
Spp 49d05ba9aa Code style (game + scripts only):
"( " --> "("
" )" --> ")"

--HG--
branch : trunk
2010-04-07 22:59:46 +02:00
Spp d19e127080 Code style (game + scripts only):
"if(" --> "if ("

--HG--
branch : trunk
2010-04-07 19:14:10 +02:00
Spp 182e9a20b1 Code style (game + scripts only):
"for(" --> "for ("

--HG--
branch : trunk
2010-04-07 19:12:44 +02:00
Spp b27ce42704 Code Style: Remove trailing spaces
--HG--
branch : trunk
2010-04-07 18:09:10 +02:00
Trazom62 ed8c5ef6ff Implement group loot for chest having GroupLootRules (go type=3, data15=1).
Implement round robin loot.
Implement round robin for underthreshold items (group loot and need befor greed).
Fix "all players pass" bug on creature.
Add SMSG_LOOT_LIST message to indicate looter (round robin or master).
And some other minor loot bugs.

Fixes issue #167.
Fixes issue #247.

--HG--
branch : trunk
2010-03-11 22:55:02 +01:00
Rat f107f9f8eb *finalized basic hard-lootmode defines
-DB devs should stick with lootmode 2,4,8,16 for hardmode loots (use as bitmask)
-and lootmode 1 as default

--HG--
branch : trunk
2010-01-26 11:06:46 +01:00
Anubisss d9cb070215 Implement QueryResult_AutoPtr type which is ACE's reference counted auto_ptr(ACE_Refcounted_Auto_Ptr) for QueryResult pointers.
Use this auto_ptr for every DB queries(except QueryNamedResult yet).

This patch guarantees NO memory leaks from QueryResult pointers.

Thanks to raczman for the idea and for the helping to make this patch.

--HG--
branch : trunk
2010-01-23 14:45:58 +01:00
n0n4m3 99f66a6bc9 Updated copyright for new year.
--HG--
branch : trunk
2010-01-16 20:19:18 +03:00
n0n4m3 9be16cf605 Some replacements .count to .find for better performance - original patch by zhenya.
--HG--
branch : trunk
2010-01-16 19:18:53 +03:00
XTZGZoReX 306f9013c3 * Correction for 6706.
- If a GO template (type 3 and 25) has at least one spawn and a data1 set to a lootid, then error. If no spawns, silently ignore.

--HG--
branch : trunk
2009-12-22 03:30:18 +01:00
XTZGZoReX 9d342e2ab6 * More DB tweaks:
- Load GO even if it has no displayid - while it's wrong, it's not something that'll kill the client anyway.
- Don't warn about non-existing loot templates for GOs - this is to allow some WDB data to be filled in (GOs that have no spawns and thus no gameobject_loot_template entries).

--HG--
branch : trunk
2009-12-22 02:39:39 +01:00
Brian 36d30faabf * Add support for RewSpellCast=-1. If -1 remove all auras applied to player at
* quest start.
* Patch by Kudlaty -- THANK YOU!

--HG--
branch : trunk
2009-12-21 14:48:30 -07:00
n0n4m3 9f45beb67e Update Map for 322a and new instance system
--HG--
branch : trunk
2009-12-17 11:30:18 +01:00
win32 bf2c3fd8cf MaNGOS merge: Mail System.
* Store loot in mail_loot_template indexed by mail template ids.
* Implement proper creating mail text copy item from mail template based mail.
* Move send functions to new MailDraft class from WorldSession.
* Implement mails sending at player levelup.
* Autor VladimirMangos, converted by me.

--HG--
branch : trunk
2009-12-16 18:58:36 +02:00
Machiavelli 1b41af6ea8 Better way to fix 6416, with help from Maximius.
--HG--
branch : trunk
2009-12-06 01:01:40 +01:00
Machiavelli 76c57e111a Fix iterator related crash for some windows debug builds in LootTemplate::LooutGroup::Process.
--HG--
branch : trunk
2009-12-05 01:28:15 +01:00
maximius 11f574b12e *Fix a crash due to an invalidated iterator. Closes #420
--HG--
branch : trunk
2009-11-23 13:57:42 -08:00
maximius 54d341b0c9 *Items are now only ever rolled for once in a loot group, as it should be. Closes #398
--HG--
branch : trunk
2009-11-23 04:10:27 -08:00
maximius c767576d92 *Cleanup, more consistant HandleDummyAuraProc code (added basepoints1 and basepoints2 and edited some spell cases to use these instead of more hacky custom methods..)
--HG--
branch : trunk
2009-11-21 17:59:24 -08:00
maximius 131b66c8b4 *Heart of the Crusader now works, thanks lobuz
*Little bit of cleanup

--HG--
branch : trunk
2009-11-17 19:24:31 -08:00
maximius 06ea80ee4b *Fix the issue where two items are supposed to drop from a group, but only one item drops, as a second roll is never performed. Based on code by elegos.
--HG--
branch : trunk
2009-11-17 18:55:47 -08:00
maximius 389a377dd3 *Destroy quest items on quest failure, and some cleanup.
--HG--
branch : trunk
2009-11-11 15:11:51 -08:00
maximius bbe7de48b8 *Limit non-equippable items to 3 drops, instead of only 1.
--HG--
branch : trunk
2009-11-10 13:31:29 -08:00
maximius aa7ae0ebb0 *Typo
--HG--
branch : trunk
2009-11-04 19:18:24 -08:00
maximius 93f3d27440 *Also include grouped items in the check added in 3e8840284b77.
--HG--
branch : trunk
2009-11-04 19:17:15 -08:00
maximius c15a8e201b *Never add the same loot item twice.
--HG--
branch : trunk
2009-11-04 19:14:10 -08:00
maximius d2b869d4e2 *Should fix the reversed groupid-lootmode issue.
*Cleanup, and convert npc_innkeeper.cpp back to ANSI from UTF-8 (was causing *nix compile issues apparently)

--HG--
branch : trunk
2009-10-28 18:25:36 -07:00
maximius 98e546a804 *Minor cleanup.
--HG--
branch : trunk
2009-10-28 17:50:33 -07:00
maximius f4d76b8216 *Implement new LootMode system, and add some basic support in boss_sartharion.cpp. Requires database support.
--HG--
branch : trunk
2009-10-28 16:31:19 -07:00
maximius 3f338cc1c3 *Massive cleanup redux.
--HG--
branch : trunk
2009-10-17 16:20:24 -07:00
maximius e585187b24 *Backed out changeset 3be01fb200a5
--HG--
branch : trunk
2009-10-17 15:51:44 -07:00
maximius 26b5e033ff *Massive cleanup (\n\n -> \n, *\n -> \n, cleanup for(...) to for (...), and some other cleanups by hand)
*Fix a possible crash in Spell::DoAllEffectOnTarget

--HG--
branch : trunk
2009-10-17 15:35:07 -07:00
megamage 90b55ff7b1 [8424] Added support for strict chatmessage validation Author: arrai
--HG--
branch : trunk
2009-08-27 19:57:35 -05:00
megamage e152ff8ec5 [8183] Some gameobject despanw related fixes Author: VladimirMangos
* Implement use `consumable` field in gameobject template for gameobject required explcit despawn at use.
    * Move gameobject template fields cech function from Gameobject to gameobject template class, and update callers.
    * Cast spells at gameobject use with gameobject guid as original caster guid, as already used in some other cases. (skipped)

--HG--
branch : trunk
2009-07-16 12:06:07 +08:00
megamage d9ec2d2196 [8072] First step to get rid of data blob.
Adds new fields gender, level, xp, money, playerBytes, playerBytes2 and playerFlags to characters table.

    The update will not work if your database contains characters with an old data field (not fitting to the actual client version).

    It's recommended to backup your character database before applying this patch.

--HG--
branch : trunk
2009-06-27 17:39:51 -05:00
QAston f558a785fc [8069] Fixed copy/paste mistake in achievement error output. Author: Saeba
[8070] Restore spell casting loot items and recipes.

* SPELL_EFFECT_OPEN_LOCK_ITEM (59) effect removed in 3.1.3
* It replaced by SPELL_EFFECT_CREATE_RANDOM_ITEM (59), random item without
template replace spells like clam loot spells)
  Used by spells that use before SPELL_EFFECT_CREATE_ITEM_2 (157) with
  itemtype==0

Note: required DB support in `spell_loot_termplate` Author: VladimirMangos

--HG--
branch : trunk
2009-06-23 14:44:16 +02:00
megamage a7794b6a52 [7939] Fixed check in LoadLootTemplates_Spell. Author: XTZGZoReX
--HG--
branch : trunk
2009-06-02 17:42:59 -05:00
megamage 0652c95126 [7892] Update spell_loot_template entry description in error output for better fit to current table use. Author: VladimirMangos
--HG--
branch : trunk
2009-05-26 16:10:42 -05:00
megamage 6d6a4a7856 [7864] Use x.0f float constant format. Author: NoFantasy
--HG--
branch : trunk
2009-05-21 10:52:35 -05:00
megamage a2b12f3ae8 [7732] Fixed compile warnings. Author: AlexDereka
--HG--
branch : trunk
2009-04-29 00:31:33 -05:00
megamage de11b9e901 [7730] Some optimizantion and code style. Author: zhenya
--HG--
branch : trunk
2009-04-29 00:26:07 -05:00
megamage cb8b3fe5db [7607] Improvements in support some generic achievement classes Author: VladimirMangos
* Implement support achievements with refAchievement field != 0, that have criterias stored in achievement refAchievement.
    * Implement support achievement complete req. with specific count of completed critirias.
    * Avoid full achievement list scan at search achievement associated with criteria.

--HG--
branch : trunk
2009-04-03 16:36:20 -06:00
megamage 941e5b9dbd [7532] Avoid warnings at use size_t with printf fromat strings. Author: VladimirMangos
--HG--
branch : trunk
2009-03-24 17:38:14 -06:00
XTZGZoReX 9fe43fa9c0 * Implementing database logging:
** LogTime and LogColors config options removed due to incompatibility.
** Old file logging still available.
** Totally redone the Log class.
** Config options added: EnableLogDB, DBLogLevel, LogDB.Char, LogDB.RA, LogDB.GM -- remember to update config file.
** SQL updates attached.

--HG--
branch : trunk
2009-03-19 21:13:52 +01:00
megamage f63c07e669 [7398] Now really really fix error message Author: VladimirMangos
--HG--
branch : trunk
2009-03-07 10:43:27 -06:00
megamage 4f6c96b98c [7394] Check loot_template.maxcount for max allowed value (255) and make better report for this case. Author: VladimirMangos
Also optimize strcture LootStoreItem that let use 4 byte for loot template element in memory instead 5 bytes.
    But limit group id to 127 max value. Check this at loading.

--HG--
branch : trunk
2009-03-06 19:39:42 -06:00
megamage 6f595b3038 [7387] Check maxcount >= min count for item (not reference) record in loot templates DB tables.. Author: VladimirMangos
--HG--
branch : trunk
2009-03-06 15:23:25 -06:00
megamage 14a3f5f923 [7344] Ignore drop rate multipliers in loot groups. Author: Velorien
For grouped loot use rates create problems with impossibility loot some items including quest items.

--HG--
branch : trunk
2009-02-27 12:24:09 -06:00