Commit graph

22120 commits

Author SHA1 Message Date
David Cernat
0fa116b47d [Client] Remove useless lines in RecordHelper 2019-01-23 00:20:51 +02:00
Koncord
0df32accca [Server] Fix ARM build 2019-01-21 12:02:02 +08:00
David Cernat
fd40e8c971 [Client] Prevent ObjectState spam by not resending an already sent state 2019-01-15 14:26:00 +02:00
David Cernat
6e47b65205 [Client] Set attribute increases & level progress after correct packets
Originally, the PlayerSkill packet contained skills, attribute increases and level progress. In 78441c769a, the attribute increases were moved to the PlayerAttribute packet and the level progress was moved to the PlayerLevel packet, but – due to an oversight – attribute increases and level progress were still being applied to the local player only when a PlayerSkill packet was received, based on whatever values were stored from the last PlayerAttribute and PlayerLevel packets.
2019-01-11 14:26:13 +02:00
David Cernat
f481c85e07 [Client] Use ADD before REMOVE for PlayerInventory in repair/recharge
Previously, when recharging or repairing an item, the client sent a PlayerInventory packet to the server with the old version of the item that was supposed to be removed and then it sent a PlayerInventory packet with the new version of the item that was supposed to be added.

Unfortunately, the current CoreScripts make it so custom items using generated IDs have their records deleted when they are completely removed from the world, however briefly, even if they are added back immediately afterwards. In practice, this meant that – before this commit – recharging or repairing a custom item led to its removal from the player inventory stored on the server, followed by the deletion of its record, followed by its readdition to the inventory (but with the record staying deleted). Logging out and logging back in immediately prevented the player from receiving the item anymore because of its now non-existent record.
2019-01-11 13:08:26 +02:00
David Cernat
8a99f215f6 [Client] Add LocalPlayer::sendItemChange() variant with mwmp::Item arg 2019-01-11 12:54:47 +02:00
David Cernat
db9c1b9882 [Client] Add MechanicsHelper::getItem() for getting mwmp::Item from Ptr 2019-01-11 12:53:26 +02:00
David Cernat
799241e8c6 [Client] Use informative error message for RefData::setCount() issue 2019-01-11 08:16:29 +02:00
David Cernat
43f195f0c7 [Client] Use clearer debug for actor initializations 2019-01-05 23:27:35 +02:00
David Cernat
2e1d4a9449 [Server] Fix non-Windows builds 2019-01-05 22:11:58 +02:00
David Cernat
81e2e48561 [Client] Fix item magic casting synchronization for spell scrolls
Previously, spell scrolls were used up before their IDs could be included in attacks packets supposed to be sent for them.
2018-12-31 13:24:32 +02:00
David Cernat
d83160523f [Client] Add items required for item magic casting when they are missing 2018-12-31 06:55:35 +02:00
David Cernat
433a69a588 [Client] Send all data for newly initialized LocalActors at least once 2018-12-31 04:36:59 +02:00
David Cernat
e70fd2cf3a [Server] Accept clients with wrong password on servers with no password 2018-12-31 03:52:25 +02:00
David Cernat
eb52babf29 [Server] Print IP instead of name or PID for players unable to connect
The player name was always blank in such situations, providing no useful information. The PID was not useful in any way either.
2018-12-30 18:02:26 +02:00
David Cernat
e96091fd6b [General] Use more consistent variable names for password, address, etc. 2018-12-30 17:23:12 +02:00
David Cernat
906d2a837d [Client] Send PlayerInventory packets when recharging items w/ soulgems 2018-12-30 11:58:33 +02:00
David Cernat
71679934a1 [Client] Send PlayerInventory packets when repairing items 2018-12-30 09:39:46 +02:00
David Cernat
5d9893ee92 [Client] Set actor killer correctly for spells that do damage over time
Additionally, clean up comments related to other code that sets actor killers.
2018-12-30 07:40:11 +02:00
David Cernat
6e1504f0a1 [Server] Use clearer variable & function names in TimerAPI 2018-12-30 04:15:53 +02:00
David Cernat
42b5a8054f [Server] Remove unusable position functions for players 2018-12-30 03:17:37 +02:00
Koncord
4ce0331f1b [Server] Fix GCC build 2018-12-29 15:54:08 +08:00
Koncord
9343b8af2f [Server] Remove unused function 2018-12-29 14:02:08 +08:00
Koncord
c2230a8a21 [Server] Add MP flag to the server if enabled 2018-12-29 12:03:01 +08:00
Koncord
a0e89208a0 [General] Fix standalone server build 2018-12-29 11:58:49 +08:00
Koncord
55cea491ca [Server] Introduce MS VC++ 2017 support 2018-12-29 11:57:26 +08:00
Koncord
6af2400752 [Server] Remove usages of get/set env. Add GetModDir function 2018-12-29 11:40:31 +08:00
Koncord
b3456a8841 [Server] Fix invalidation of iterators 2018-12-29 11:10:20 +08:00
David Cernat
343dd8b5ea [Client] Fix addition of items to player inventories
Previously, multiple stacks of the same item ID could overwrite data in each other because of how the logic in ContainerStore::add() works. For example, a stack of 5 grand soul gems with no souls would get added to the player, then the attempt to add a grand soul gem with a particular soul would retrieve the previous stack first before setting all of it to that soul, resulting in 6 grand soul gems with that soul.
2018-12-26 13:41:19 +02:00
David Cernat
76ac905efc [Client] Send PlayerInventory packets when trapping souls in soulgems 2018-12-26 12:25:00 +02:00
David Cernat
f853368641 [Client] Fix loss of player items in ContainerStore::unstack()
Previously, unstacking items for a player led to a PlayerInventory packet being sent about the items' removal.

This change makes it so both a packet about their re-addition and their removal are sent instead, cancelling each other out, which is inelegant, but arguably preferable to complicating the sending of PlayerInventory packets again.
2018-12-26 12:24:26 +02:00
David Cernat
5e38e8abdb [Server] Add GetArchitectureType() script function
Additionally, bring GetOperatingSystem() up-to-date by making it use the renamed function in Utils.
2018-12-17 11:55:50 +02:00
David Cernat
9fe54aa8c6 [General] Add getArchitectureType() to multiplayer Utils
Additionally, rename getOperatingSystem() into getOperatingSystemType() for clarity.
2018-12-17 11:46:51 +02:00
David Cernat
fa1700e2ab [Server] Add GetOperatingSystemType() script function 2018-12-17 11:32:31 +02:00
David Cernat
da6b89c185 [General] Add getOperatingSystem() to multiplayer Utils 2018-12-17 10:47:34 +02:00
David Cernat
50714599d9 [Client] Spawn at exterior 0, -7 by default 2018-12-17 08:25:22 +02:00
David Cernat
afd17e5a48 [Client] Don't finish drag & drop that is supposed to be unsuccessful
This prevents items from vanishing when your attempt to drop them in a full container is denied.
2018-12-06 18:11:52 +02:00
David Cernat
a6c6db89fc [Client] Send object packets when scripts use PlaceItem/PlaceItemCell 2018-12-05 01:56:27 +02:00
David Cernat
d05a82a734 [Client] Avoid repetitive code when unequipping items in resurrection 2018-12-04 03:55:03 +02:00
David Cernat
b5b26c6685
Merge pull request #492 from terabyte25/patch-7
[Client] Disallow opening inventory menu when not logged in
2018-12-01 23:17:05 +02:00
terrabyte25
35755eb1f1
[Client] Disallow opening inventory menu when not logged in 2018-12-01 10:51:33 -06:00
David Cernat
b7090b2550 [Server] Add experimental option for not crashing from Lua script errors
Additionally, fix return type of GetPluginEnforcementState()
2018-12-01 03:03:39 +02:00
David Cernat
b39e3f518b [Client] Use correct log levels for inventory and dynamic record packets 2018-11-30 23:38:16 +02:00
David Cernat
d8ca268067 [Server] Move plugin enforcement functions to ServerFunctions 2018-11-30 22:43:10 +02:00
David Cernat
2933526995 [Server] Include errors related to Lua calls in server logs 2018-11-30 22:01:02 +02:00
David Cernat
ef80894c5c
Merge pull request #486 from testman42/patch-2
Use more descriptive terminology for chat modes
2018-11-17 23:19:17 +02:00
Testman
6b3f598837
Use more descriptive terminology for chat modes
Changed "Chat disabled" to "Chat hidden", "Chat enabled" to "Chat visible" and "Chat in hidden mode" to "Chat appearing when needed".
2018-11-17 16:54:14 +01:00
David Cernat
eb3ae95f0e [Documentation] Display build status for correct branch 2018-11-16 06:40:21 +02:00
David Cernat
d3eb106c3b [Documentation] Update readme for current situation 2018-11-16 04:49:14 +02:00
David Cernat
e834a4ec74 [Client] Find closest enchantmentCharge in getItemPtrFromStore()
Enchanted inventory items continuously recharge their enchantment charges, which getItemPtrFromStore() should account for.

Additionally, prevent framelistener errors caused by PlayerItemUse packets about non-existent items.
2018-11-13 20:36:31 +02:00