Commit Graph

766 Commits

Author SHA1 Message Date
Nefarion 49fd11ab5a First step of comment style refactoring to doxygen-style. 2013-03-08 21:55:37 +01:00
Spp 377cfdb560 Core/RBAC: Fix multiple permissions and remove multiple config options that are currently implementes by RBAC
- Remove config options: CONFIG_ALLOW_TWO_SIDE_INTERACTION_CHAT, CONFIG_ALLOW_TWO_SIDE_INTERACTION_MAIL, CONFIG_GM_LOG_TRADE, CONFIG_ALLOW_TWO_SIDE_ACCOUNTS, CONFIG_ALLOW_TWO_SIDE_WHO_LIST, CONFIG_ALLOW_GM_FRIEND, CONFIG_ALLOW_TWO_SIDE_ADD_FRIEND, CONFIG_SILENTLY_GM_JOIN_TO_CHANNEL
- Fix RBAC_PERM_SKIP_CHECK_CHAT_SPAM (Was checking spam for those that had the permission)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_CHAT for sender of whispers (Restores GM being able to whisper players)
- Only check RBAC_PERM_TWO_SIDE_INTERACTION_MAIL for sender
- Fix .ticket assign <Player>, with last RBAC change it was changed by mistake from Player to Account
2013-03-08 13:15:25 +01:00
Shauren 856551c981 Core/Players: Corrected online flag set in database when logging out, spotted by e000
Closes #9310
2013-03-05 22:36:58 +01:00
Vincent_Michael 5d4e657e91 Core: Whitespace cleanup 2013-03-04 19:14:58 +01:00
QAston 344eb8e31c Merge remote-tracking branch 'origin/refactoring' 2013-03-04 15:58:33 +01:00
QAston 4eec72c986 Core/Entities: Move complex function implementations from Player.h to Player.cpp 2013-03-04 15:56:00 +01:00
Shauren f698753a57 Added missed change to previous commit 2013-03-04 14:28:57 +01:00
Shauren 4a6f5d2b54 Core/Spells: Defined & implemented SPELL_ATTR6_IGNORE_CATEGORY_COOLDOWN_MODS 2013-02-28 20:46:50 +01:00
Shauren af4ac778d7 Core/Quests: Implemented quest flag forcing the player to be flagged for PvP as long as the quest is in his log. 2013-02-26 17:14:13 +01:00
Shauren e3e5d14d52 Core/Quests: Updated quest flags and implemented QUEST_FLAGS_NO_MONEY_FROM_XP - experience reward from quests using this flag is not converted into money at max level. 2013-02-26 16:57:11 +01:00
Spp 019770dddb Core/RBAC: Create new permissions related to character creation
- 'Skips character creation team mask check'
- 'Skips character creation class mask check'
- 'Skips character creation race mask check'
- 'Skips character creation reserved name check'
- 'Skips character creation heroic min level check'
- 'Creation of two side faction characters in same account' (Affected by global config option)
2013-02-25 15:48:19 +01:00
Spp 18562a43ba Core/RBAC: Create new permissions 'Skips needed requirements to use channel check', 'Filter whispers', 'Allow say chat between factions'. Last one needs config option to be enabled and both sender and receiver to have the permission 2013-02-25 15:48:18 +01:00
Spp 9bd697066b Core/RBAC: Add new permissions 'Skip disable map check', 'Skip reset talents when used more than allowed check', 'Skip spam chat check', 'Restore saved gm setting states', 'Use Config option START_GM_LEVEL to assign new character level' 2013-02-25 15:48:18 +01:00
Roc13x 0267b53813 Core/Items: Fix logic in Player::AddItem
Should send client the amount it gave you, not the amount it couldn't
give you
2013-02-15 12:29:34 +00:00
Shauren d232977ec4 Core/Maps: Prevent creating maps without a valid Map.dbc entry
Closes #9181
2013-02-14 16:54:31 +01:00
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