Commit Graph

751 Commits

Author SHA1 Message Date
Shauren 97e876209e Core/Players: Fixed crash when mute expired while player was ingame 2013-02-08 18:18:26 +01:00
Nay 0b3170c228 Core/Player: Fix a query that was wrongly deleting items
CHAR_DEL_ITEM_INSTANCE deletes by item guid but in Player::DeleteFromDB the guid being used was player's guid.
That means that if player with guid 100 was deleted, the item with guid 100 would also be deleted. This item could or could not belong to the player.

Closes #8883
Closes #9136

Thanks to @vlad852 for finding the issue
2013-02-06 13:17:21 +00:00
Spp dd0658e675 Warning fix 2013-02-05 11:12:00 +01:00
Spp 61979f8591 Scripts/Player: Add OnMapChanged to PlayerScripts (after map changed)
Core/Dungeon Finder: Use OnMapChanged script to cast/remove Luck of the draw
- Also move code to force party update to LfgPlayerScript
- Remove some obsolete Lfg code after recent commits
2013-02-04 16:52:43 +01:00
Spp b980aff83e Core: Implement Role based Access Control
- This system will give more control of actions an account can perform.

System defines:
- Permissions to perform some action
- Roles: a set of permissions that have some relation
- Groups: a set of roles that have some relation

Operations:
- Grant: Assign and allow
- Deny: Assign and do not allow
- Revoke: Remove

Precedence to know if something can be done: Grant, Deny. That means, if you are granted some action by a role but you have denied the permission, the action can not be done.

Some Rules:
- Groups can only have roles
- Roles can only have permissions
- An account can be assigned granted and denied roles. Permissions inherited from roles are granted if roles is granted and denied if roles is denied
- An account can be assigned granted and denied permissions
- An account can have multiple groups, roles and permissions
- An account can not have same role granted and denied at same time
- An acconnt can not have same permission granted and denied at same time
- Id 0 can not be used to define a group, role or permission

Added some permissions as a sample of use (Instant Logout, Skip Queue, Join BGs, Join DF) and some permissions as a workaround to commands till command system is modified to use RBAC
2013-02-04 09:04:33 +01:00
Spp ec5d16db8a Core/Dungeon Finder: Declare some functions private as those are not used outside LFGMgr. Also do not expose LFGDungeonData outside LFGMgr 2013-02-04 06:43:03 +01:00
Spp f743424f63 Core/Dungeon Finder: Corrections to previous commit
- player::inRandomLfgDungeon was supposed to return if current player map and difficulty are the ones player applied for
2013-02-04 05:50:52 +01:00
Spp 9bdfc87774 Core/Dungeon Finder: Use lfg namespace to encapsulate all LFG classes, structs and enums 2013-02-04 04:43:50 +01:00
Shauren 0bf29d45d1 Core/Players: Prevent trading, taking gold from mail and withdrawing from guild bank if it would put the player over gold cap.
Closes #4015
2013-02-01 11:38:55 +01:00
Vincent_Michael 480c847156 Core: Some cosmetic changes 2013-01-26 19:49:53 +01:00
Shauren bf0c976f76 Core/Players: Fixed uninitialized variable for item swaps 2013-01-24 17:23:34 +01:00
Spp cc605e0605 Core/Misc: Minor cosmetic changes here and there 2013-01-24 16:57:35 +01:00
Nay 40a470c669 Merge pull request #9037 from krofna/crefixes
Fix error when swapping unique equipped weapon on dual wield
2013-01-24 06:39:50 -08:00
Mislav Blažević 54027803bd Fix error when swapping unique equipped weapon on dual wield
Also fix rings and trinkets
2013-01-24 08:59:14 +01:00
Shauren 0333c4ce8f Core/DataStores: Corrected reading CharStartOutfit.dbc 2013-01-19 18:19:30 +01:00
Shocker 7d28c10bd0 Core/Misc: Delete spell from character_spell table too when encountering an invalid spell 2013-01-18 03:22:58 +02:00
Spp 802657250c Core/Misc: Apply codestyle to multiple files 2013-01-14 09:50:59 +01:00
Shauren 84553f168c Core/DataStores: Changed index on CharStartOutfit.dbc to allow lookups directly using race/class/gender combo instead having to iterate entire store to find the proper entry 2013-01-11 20:50:05 +01:00
Shauren 32fa3f6018 Merge pull request #8848 from NightQuest/save_hook
Core/Scripts: Created a hook for when a player is about to be saved.
2013-01-05 05:16:30 -08:00
Nay 8ac5b3b7d6 Core/Player: Prevent a crash in CastedCreatureOrGO and add an assertion to KilledMonster 2013-01-04 21:15:18 +00:00
Ellie c2e610cde7 Core/Scripting: Created a hook for when a player is about to be saved. 2013-01-02 17:03:57 -08:00
Spp d36c4a91ba Core/Misc: Use equal_range instead of lower_bound/upper_bound calls where possible. 2013-01-02 09:53:43 +01:00
Gacko 01b705c844 Core/Player: Fix armor calculation - 2nd try
Base armor value from WDB data includes the ArmorDamageModifier. Items of
same item level, required level, armor type and equiptment slot should
have (nearly) the same armor values.

See following links for further proofs:
http://pastebin.com/fqNJLYj4
http://www.wowhead.com/item=50466#comments:id=889035:reply=444786

The shown item should have a base armor value of 177 as similar items and
a bonus armor value of 560 which equals 737 - like in DB atm.
2013-01-01 21:43:17 +01:00
Vincent_Michael cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Shauren 47ac83ec3a Core/Units: Check aura presence before casting liquid spell to avoid resetting periodic tick timers 2012-12-31 21:12:33 +01:00
Vincent_Michael e48bbac93f Core: Fix warning in 7b9b67a3b3 2012-12-27 01:42:25 +01:00
Vincent_Michael 7b9b67a3b3 Core/Quest: Drop table quest_end_scripts 2012-12-26 23:20:05 +01:00
Shauren 75e7cf7eb5 Core/Quests: Added support for 10/25 man only raid quests 2012-12-24 19:53:28 +01:00
stfx 51fadb57e0 Allow setting afk/dnd message in afk/dnd state
Also use the same variable to store the message for AFK and DND

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-12-23 17:49:47 +00:00
stfx 01ef119703 Fix receiving whispers while being dnd
Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-12-23 17:49:46 +00:00
Subv 143340b38c Core/Movement: Fixed near teleports, big thanks to @Trista who basically figured this out on his own. 2012-12-23 08:09:56 -05:00
Subv 957571e18c Merge pull request #8662 from MrSmite/ItemContainer_1.1
Item Loot Saving
2012-12-20 07:00:29 -08:00
Kaelima 05c38b20ea Merge pull request #8668 from joschiwald/random_changes
Core/Misc:
2012-12-19 23:48:00 -08:00
joschiwald f4e7cde1b5 Core/Misc:
- some simplifications in reputation calculation
- removed aura in SPELL_AURA_LINKED should depends on SpellDifficulty
- remove some unneeded variable declarations when it's already declared
- remove some hacks
- fix some warnings in Lfg stuff
- some codestyle changes
2012-12-19 12:55:51 +01:00
Nay 1bd820e50f Core/Player: Fix build 2012-12-17 01:28:38 +00:00
Roc13x 9776bdfdfa Core/Items: DestroyItemCount also searches bank
Closes #8240

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-12-17 00:54:47 +00:00
MrSmite 04f08d26a7 Implements saving of loot (items / money) contained inside lootable inventory items.
* Unlooted items / money persist across player sessions
* Loot inside items is tied to the item rather than the player so if trading
  partially looted items becomes possible, this implementation will still work

* New tables added:

    characters_database.sql (first time users)
    characters_create_item_loot.sql (existing users)

Implementation Can be tested with:

 Watertight Trunk [21113]
 Bulging Sack of Gems [25422]
 Fat Sack of Coins [11937]

Closes #2048
2012-12-15 00:06:32 -05:00
Vincent_Michael 36c3395bea Core/Quest: Fix reputation calculation for SPELL_AURA_MOD_REPUTATION_GAIN 2012-12-12 20:32:05 +01:00
joschiwald 5c33c54054 Core/Player: correct SetHomebind and cleanup Spell::EffectBind 2012-12-08 23:46:16 +01:00
Vincent-Michael 5fae5b59ce Core/Reputation: Fix engrish magic number :/ (thx Shauren) 2012-12-04 16:48:57 +01:00
Vincent-Michael c90ec469db Core/Reputation:
- Fix copy and paste fail (thx zorix)
- Add new field for monthly rate quests
2012-12-04 15:58:57 +01:00
Vincent-Michael 2b3b124e09 Core/Reputation: Implemented new reputation_reward_rate fields for dayily/weekly quests 2012-12-04 14:48:44 +01:00
Vincent-Michael 0a3972db7c Core/Quest: Removed table quest_start_scripts 2012-12-04 11:23:10 +01:00
Vincent-Michael b2928e59fa Core/Quest: Add support for monthly quests
Author: svetilo12
Converted and updated by: Subv
2012-12-04 00:04:06 +01:00
Vincent-Michael f957dd462f Core/Conditions: Implemented CONDITION_SOURCE_TYPE_NPC_VENDOR = 23 2012-12-01 01:52:20 +01:00
Spp e954498560 Core/Misc: Random changes here and there to minimize differences with 4.3.4 branch 2012-11-27 13:03:12 +01:00
Spp 2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
Spp 611ffbb189 Core/Units: make SetHover virtual 2012-11-27 07:45:08 +01:00
Shauren 5e9acb3341 Core/Player: Fixed crashes happening when player logs in to a battleground which has ended and doesn't have valid return location stored in database.
Closes #5441
Closes #7093
Closes #8242
2012-11-26 10:34:11 +01:00
Shauren 408793a736 Core/Players: Logic fixes for tradeable soulbound items 2012-11-25 11:12:16 +01:00