Commit Graph

347 Commits

Author SHA1 Message Date
jackpoz
dc58ec0d6c Scripts/Commands: ".modify speed" targets current Player by default
Allow ".modify speed" command to target current Player if there is no target or if the selected Unit is a Creature.
This behavior could be extended to other commands that require target Players.
2014-04-13 14:06:21 +02:00
jackpoz
c4f4a023ea Core/Chat: Fix valid chat links being handled as invalid
Fix a case where valid chat links would have been handled as invalid.
This happened if these conditions were true:
- the link was a profession and the link name started with the same name of the profession, like spell id 61120 in esES locale "Inscripción de la tormenta de maestro" with profession name "Inscripción"
- the profession name was the same for more than 1 locale available, like esES and esMX, or enUS and enGB

Restore memmove() instead of memcpy() wrongly replaced in 791130f6fa , it's unsafe to use memcpy() with overlapping memory regions.
2014-04-04 22:16:14 +02:00
jackpoz
0056ec04c0 Core/Misc: Fix warning with GCC 2014-03-30 13:30:00 +02:00
jackpoz
dfca19444a Core/Misc: Fix warning 2014-03-29 21:51:45 +01:00
jackpoz
4cffd2e707 Core/Commands: Handle "" as empty string argument
Fixes #11548
2014-03-29 21:07:46 +01:00
zengwf
23acf75d3b Core/Movement: Add LOS check for fleeingmovement target point.
Prevents fleeing or feared units from going to upper floor ignoring walls/ceilings with mmaps on(and usually get stucked).

Current implementation just randomly selects a distance and angle against the frighting unit, when in narrow circumstance such as underground caves, such targeting point would be at another floor.

Closes #11300
Ref #9475 (needs fixed confirmation)
2014-01-12 00:33:33 +00:00
Vincent_Michael
20004050bc Update copyright note for 2014.
Happy new year.
2014-01-01 00:07:53 +01:00
Shauren
20a2b69178 Core/Chat: Fixed GM messages in chat channels after refactoring 2013-12-24 20:21:13 +01:00
Shauren
107af52853 Core/Chat: Refactored building chat packets
* Moved everything into one specialized method instead of being scattered all over the place
* Allow localizing creature names in chat messages (when using $N)
* Send SMSG_GM_MESSAGECHAT for gm messages
2013-12-23 14:23:49 +01:00
jackpoz
04cc51a6cf Core/Misc: Fix some static analysis issues
Fix some static analysis issues, mostly false positive about fields not initialized in the constructor. It's good practice anyway to always initialize them.
2013-12-01 16:19:30 +01:00
Spp
94e2b9332a Core/Logging: Remove LOG_FILTER_XXX defines with it's value (remember logger names are case-sensitive) 2013-11-08 10:50:51 +01:00
leguybrush
0a308144a8 Core/Code: Unify [more] codestyle for brackets: )\n{\n} to ) { }. 2013-10-28 14:36:07 -04:00
Ascathor
2607738990 Core/Code: Unify codestyle for brackets: {} to { }.
Also added missing copyright to some files.
2013-10-27 23:46:02 +01:00
Shauren
9d19e4d0ac Core/Commands: Restored old functionality of getSelectedPlayer in chat commands
Also fixed build
2013-10-06 11:28:25 +02:00
Shauren
a368fae588 Core/Players: Fixed issues with incorrect targets being selected for spells 2013-10-03 17:07:25 +02:00
Spp
cfaea769bc Core/RBAC: Move RBAC code to namespace rbac 2013-09-27 13:35:45 +02:00
Ascathor
4782cc4650 Core/Misc: Fixed some more issues found by static code analysis tools. 2013-09-15 13:17:37 +02:00
Spp
3232b69ff3 Core/RBAC: Move commands security to RBAC (using generic RBAC Permissions)
- Warning: This will break commands for any custom security level
2013-08-30 13:57:09 +02:00
Nay
8eaf763235 Core&Tools: Fix multiple issues found by a static code coverage tool 2013-08-26 02:00:18 +01:00
Nay
12973de799 Core&Tools: Fix multiple issues found by a static code coverage tool 2013-08-24 22:57:22 +01:00
Shauren
ab6be8c603 Core/Battlegrounds: Fixed error with counting AB owned nodes (and warning fixes) 2013-08-01 18:02:08 +02:00
b4nan1
894a2434bf Update Chat.cpp
this is better or?
2013-05-29 14:59:37 +02:00
Shauren
f6241a07a3 Core/Commands: Warning fix 2013-05-24 20:05:41 +02:00
Shauren
bda68d3f9d Core/Commands: Fixed wrong field types used in db queries for pinfo command and output alive state if target is offline 2013-05-24 18:31:19 +02:00
Spp
d1677b2db0 Core/Logging: Performance-related tweaks to logging system
All sLog->out* functions (except outCommand atm) are replaced with TC_LOG_* macros.
    Memleak fix
2013-05-13 15:07:36 +02:00
xjose93
c7a6c1be84 Core/Log: Added guid (of gm), area and zone to gm command log. 2013-04-23 19:09:48 +02:00
Spp
69e81d46b1 Core/Misc: Define multiple functions const (+ code cleanup here and there) 2013-03-20 14:20:17 +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
Vincent_Michael
447b23c3bb Core: Whitespace cleanup 2013-02-25 19:54:41 +01:00
Spp
d47b95cc0a Missing change related to permission 'Change channel settings' 2013-02-25 15:51:48 +01:00
Spp
0c2402df95 Core/RBAC: Create new permissions 'See two side who list', 'Add friends of other faction', 'See all levels with who command' and 'Allows to add a gm to friend list' 2013-02-25 15:48:19 +01:00
Spp
fb9893a190 Add missing change related to permission 'Two side interaction channel' 2013-02-25 15:48:19 +01:00
Spp
f67330e2ad Core/RBAC: Create new permissions 'Allow channel chat between factions', 'Join channels without announce' (both need config option enabled and permission set) and 'Change channel settings without being channel moderator' 2013-02-25 15:48:18 +01:00
Spp
fc78c48495 Core/RBAC: Create new permissions 'Notify if a command was not found' and 'Enables lower security than target check' 2013-02-25 15:48:18 +01:00
Spp
fedc26a115 Typo fix 2013-02-05 09:26:52 +01:00
Spp
f210ab0d47 Core/RBAC: Allow custom security levels for commands. (Before this change any command with seclevel > 3 had the same permissions than player commands)
Note: This is still a workaround till command system is moved to RBAC
2013-02-05 09:11:56 +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
8cd408ae6c Core/Misc: Some changes to minimize differences with 4.3.4 branch 2013-01-30 10:34:18 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +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
Vincent-Michael
ea60648c88 Core: Fix typo 2012-11-24 00:25:56 +01:00
Spp
26006551e2 Fix wrong replacement in 32c259b1ce (Fixes a minor error msg) 2012-11-23 12:30:11 +01:00
Spp
b1ec4b61ac Fix error in 32c259b1ce (broken chat) 2012-11-23 01:03:46 +01:00
Spp
32c259b1ce Core/Channels: Remove unnecessary calls to FindPlayer wherever is possible
- Add better opcode debug messages
- Move isValidChatMessage debug messages to trace
2012-11-22 12:11:35 +01:00
Spp
b99c347747 Core: Remove Player.h dependency from all the possible headers 2012-11-17 05:18:37 +01:00
leak
6bf9cb56a9 Core/Chat: Prevent client crashes with invalid chat language and message type combinations
Fixes #8083
2012-11-01 20:04:35 +01:00
Spp
9fbc4c0ae2 Core/Misc: reduced amount of string memory allocations (Step II) 2012-10-24 15:34:48 +02:00
Spp
013fb1f4d9 Core/Misc: reduced amount of string memory allocations (Step I) 2012-10-24 15:34:48 +02:00
Spp
f8846cdeaf Core/Utilities: Do not expose internal store structure in Tokens and rename it to Tokenizer 2012-10-02 11:54:41 +02:00