Commit Graph

175 Commits

Author SHA1 Message Date
Vincent_Michael
4e789d4c5c Core/Commands: Optimize for command .npc near 2013-03-09 23:05:27 +01:00
Shauren
f37e0ee838 Core/Players: Implemented converting quests on faction change (keeping old faction quests in disabled state - not loaded during login) and restoring them if changing back to original faction
Closes #890
Closes #9248
2013-03-04 14:15:52 +01:00
Nay
028c72a9f2 Core/NPCs: Refactor equipments
- creature_template.equipment_id deleted
- creature_equip_template.entry == creature_template.entry
- id field added to creature_equip_template -> PK(entry, id)
- id field in creature_equip_template starts at 1
- creature.equipment_id references id of creature_equip_template
- creature.equipment_id = 0 means no equipment at all (default 1)
- creature.equipment_id = -1 means pick a random equipment from creature_equip_template
- add equipment info to .npc info command

While table creature_equip_template got bigger in size, this system is easier to mantain and allows creatures to have a random template from a group of equipments
2013-02-18 12:24:18 +00:00
Shauren
b6e56e42ea Core/Auth: Reverted part of fb43a92cc2 - session key is still needed after logging in to be able to switch realms 2013-02-08 01:03:56 +01:00
Shauren
fb43a92cc2 Core/Accounts: sessionkey field in account table is only a temporary storage to pass data from authserver to worldserver and should only be used as such. Clearing sessionkey from database after a successful login to prevent possible exploits. 2013-02-07 16:15:23 +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
Aokromes
6d8a69d640 Merge pull request #9099 from Bezo/mutenew
Add Mute reason and mute by to the db so you can get this info from the ...
2013-02-04 06:55:26 -08: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
67d46ae1ae Scripts/Commands: Show correct guild Rank when using .pinfo command
(Corrections to 1b551cc1)
2013-01-31 09:18:42 +01:00
Bezo
760d62e934 Add Mute reason and mute by to the db so you can get this info from the db with the pinfo command when player get muted.
old LOGIN_UPD_MUTE_TIME change to LOGIN_UPD_MUTE_TIME_LOGIN due the use of it when character login to world.
2013-01-30 13:09:41 +02:00
Spp
2c32393a39 Core/Misc: Always state what columns are affected by MySQL statements 2013-01-30 08:42:01 +01:00
Shauren
6e80357f8e Core/Authserver: Added possibility to allow realm connections both from "world" and local networks. 2013-01-27 17:33:01 +01:00
Nay
1b551cc157 Scripts/Commands: Add guild info to .pinfo
Original patch by @secharles, modified

Closes #8946
2013-01-26 21:33:13 +00:00
thomas33
c36aa6e7af fix typo 2013-01-25 12:25:06 +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
ebd14b4f01 Core/Mysql: Multiple changes
- added support for setting NULL column values to MySQL wrapper in core
- replaced nonstandard strdup function and manual memory management with std::string
- fixed bug in MySQLPreparedStatement::getQueryString method, it failed when string parameter contained embedded '?' symbols
- fixed memory leak in MySQLPreparedStatement::setString method
2013-01-02 12:22:50 +01:00
Vincent_Michael
7fea285aea Core/Command: Add command for near creature finding 2013-01-01 18:16:32 +01:00
Vincent_Michael
cc65aba789 Update copyright note for 2013.
Happy new year.
2013-01-01 00:41:01 +01:00
Vincent_Michael
63ea4b1056 Core: Fix some codestyle in 957571e18c 2012-12-21 22:22:36 +01: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
b2928e59fa Core/Quest: Add support for monthly quests
Author: svetilo12
Converted and updated by: Subv
2012-12-04 00:04:06 +01:00
Spp
d6aee08621 Core/Misc: Include character level in log when a character is being deleted 2012-11-30 13:59:01 +01:00
Spp
2251d1bfae Core/Misc: Set mode 0644 for files 2012-11-27 13:03:12 +01:00
horn
771aafc499 Core/Calendar: Completely rewrite and fix most of the calendar system
There are still some issues that need to be fixed, for more info see CalendarHandler.cpp TODO part.
Some unblizzlike behaviour possible, we don't have a lot of sniffs.
Big thanks to @Warpten, he joined my project and helped a lot.

IMPORTANT NOTE: Read / append packed time functions in ByteBuffer.h are not correct, they need to be fixed in order to have event times accurate

Signed-off-by: Nay <dnpd.dd@gmail.com>
2012-11-18 22:42:28 +00:00
Spp
58ec4e5319 Core/Guild: Code Refactor
- Send correct events when modifiying Ranks (Add, modify, delete)
- Store money/slots withdraw, not remaining slots. This will update remaining slots/money properly.
- Reset daily slots/money withdraw for all members at same time, configurable
- Better debug messages
2012-11-02 22:26:10 +01:00
kaelima
98588aa192 Core/Ticket:
- Fully parse CMSG_GMTICKET_CREATE, use GmTicket::GetChatLog() to access the reporters chat log from this session (unused atm, possible useful to detect chat harassment)
- Simplify SMSG_GMTICKET_GETTICKET and fix "category" field (renamed it same as in blizz LUA files)
- Store response in DB
2012-10-17 00:53:55 +02:00
tibbi
405c3b09aa adding a new prepared statement for selecting char at_login and titles 2012-10-08 17:29:02 +01:00
tibbi
d49c2a5e4d correct reputation converting at faction change 2012-10-07 13:55:04 +01:00
tibbi
187133bc0e emptyline 2012-09-27 22:40:59 +01:00
tibbi
404a036fa9 adding Title converter to faction converter, original author Silinoron 2012-09-27 22:38:19 +01:00
Spp
358c6a26d6 Core: Warning fixes (Also some -pedantic under game folder) 2012-09-10 13:04:31 +02:00
kaelima
bdfae83898 Core/Creature: Added DB support for UNIT_FIELD_FLAGS_2. Thanks cyberbrest
- Added more flags to UnitFlags2 enum (Thanks wpp)
2012-08-30 04:52:56 +02:00
Spp
4a5a077b65 Core/Logging: Use prepared statements in AppenderDB 2012-08-06 13:36:34 +02:00
Vincent-Michael
cc0ff69ca4 Core/Commands:
* Add remove support for disable command
* Add quest disables support
* Add check for no existent entry
* Fix problems with flags 0
* Fix code style
2012-08-05 02:02:35 +02:00
Alternative
dc7030ced6 Some codestyle changes. 2012-08-02 16:47:28 -04:00
Alternative
f303782de4 Added disable commands. 2012-08-02 16:33:35 -04:00
Shauren
4df39dae95 Core/AuctionHouse: Refactored and corrected building auction mail messages 2012-07-19 15:33:14 +02:00
NNN666
e757ebf6ba Core/Player: Fix issues with 'ignore this slot' option on equipment manager usage 2012-07-13 16:27:11 +02:00
Shauren
c7775c8d72 Core/Maps: Moved object respawn time storage from global to map level. This removes unneccessary locking since all objects run within its map's thread. 2012-06-07 23:20:57 +02:00
kaelima
f34e650fe0 Core/Accounts: Delete all bans related to an account when it has been deleted. 2012-05-06 02:37:31 +02:00
kaelima
7f51c399c6 Core/DBLayer: CHAR_DEL_CHAR_AURA_FROZEN query should be asynchronous
Closes issue #6273

Also corrected one opcode name in Opcodes.cpp (changes nothing)
2012-04-30 02:07:59 +02:00
kaelima
7f903edcd9 Core/DBLayer: Fix two crashes when using pdump command
Closes #6107
2012-04-09 03:33:46 +02:00
Nay
3d83f663f6 Core/Tickets: Add report time and current latency to lag_reports table
It's a tiny bit more useful now.
2012-04-07 19:12:14 +01:00
Shauren
d9451cedd8 Core/World: Add character name data after loading PlayerDump
Closes #3653

Note: Manual changes in database while the server is running are not advised thus not supported
2012-04-03 00:02:58 +02:00
Nay
b7f7e3118c Core/DBLayer: More type fixes
Thanks to Vasago for the help in spotting the errors
Thanks to Subv as well (so he doesn't feel lonely)
2012-04-01 22:41:47 +01:00
Nay
91c7b5d2ca Core/DBLayer: Delete a triplicated prepared statement (LoginDatabase)
Thanks to Anubiss for spotting it
2012-03-31 15:48:40 +01:00
Nay
c71f75e9ca Core/Logging: Fix a typo in DebugLogFilters - Database & AI
Thanks to Garthog for finding it
2012-03-31 15:13:56 +01:00
Shauren
5843851559 Core/DBLayer: More prepared statement corrections 2012-03-29 23:22:10 +02:00
click
6237ddac34 Partially revert a36a0a77ef.
Cleaning databases for old/deprecated and expired quests should never be a
developers choice specifically. This should be done by admins, not developers,
through the use of the already existing paramters found in the worldserver config :
CleanCharacterDB / PersistentCharacterCleanFlags

An adjustment to the respective questloader prepared statement has been done to
accomodate for the earlier change (by not loading such quests into memory at all).

Documentation for how this cleanup-procedures work already exists in the core :
doc/CharacterDBCleanup.txt.
2012-03-28 19:31:06 +02:00
leak
830a7fb08b Core/DBLayer: Restore pet loading
closes #5878
2012-03-26 18:58:24 +02:00