Commit Graph
789 Commits
Author SHA1 Message Date
David Cernat 6df875f9c2 [General] Use inventoryHelper.addItem() whenever possible
This fixes a significant bug where every custom potion created through regular gameplay was placed in its own slot in the player's inventory table, which – combined with the record removal logic in BasePlayer:SaveInventory() – made links to custom potions get removed prematurely.

Additionally, add debug information for every item change in BasePlayer:SaveInventory()
2018-10-19 21:25:04 +03:00
David Cernat 0a071ccd2e [Player] Move handling of attributeSkillIncreases to correct functions
These were originally part of skill packets, but were moved to attribute packets in TES3MP/openmw-tes3mp@78441c769a without a corresponding change being made in the Lua scripts.
2018-10-18 20:05:42 +03:00
David Cernat ac018517a3 [Cell] Add extra integrity check to LoadActorCellChanges() 2018-10-18 20:02:24 +03:00
David Cernat 9d596a00ac [MenuHelper] Rename requireAdminRank into requireStaffRank 2018-10-14 11:52:54 +03:00
David Cernat df7475df17 [MenuHelper] Add currentPlayerDataVariable and concatenation variables 2018-10-14 11:20:40 +03:00
David Cernat cee882c376 [MenuHelper] Add chatName variable 2018-10-14 09:38:44 +03:00
David Cernat ffb80e30be [EventHandler] Reinstate kicks for unlogged players sending ObjectLock
This should no longer cause any problems as of TES3MP/openmw-tes3mp@d9dd7073cf
2018-10-13 15:44:12 +03:00
David Cernat b1783cc8dd [General] Don't save players twice on cell changes
Additionally, log all player saving.
2018-10-13 12:25:09 +03:00
David Cernat 4928774737 [Player] Move handling of level progress to LoadLevel() & SaveLevel()
This now accounts for the fact that the level progress was moved from the PlayerSkill packet to the PlayerLevel packet in TES3MP/openmw-tes3mp@78441c769a
2018-10-12 22:05:04 +03:00
SchnibbselandGitHub 5c6055c864 Update logicHandler.lua 2018-10-11 09:52:58 +02:00
David Cernat a68ce6b6c7 [LogicHandler] Always allow admins to use console without kicking them 2018-10-10 20:15:02 +03:00
David Cernat 98f233a577 [Player] Add temporary fix for bug where health gets saved as 1 2018-10-10 16:42:22 +03:00
David Cernat e33a865e19 [Player] Don't use nil values for souls when saving inventory items
Previously, although player inventories without soul keys looked nicer and more compact, they complicateed the item-removal logic and caused item duplication.
2018-10-10 14:01:40 +03:00
David Cernat 1e9f69f980 [Player] Fix logic when iterating over spellbooks from previous versions 2018-10-09 11:28:01 +03:00
David Cernat 945c5c7a3f [Cell] Use nil checks when loading placed & spawned objects 2018-10-09 11:07:48 +03:00
David Cernat a2a21a1449 [RecordStore] Add nil checks to GetMatchingRecordId() 2018-10-09 01:37:56 +03:00
David Cernat 74e918020e [RecordStore] Reuse existing generated potion records when possible 2018-10-08 19:27:39 +03:00
David Cernat 92ddc00176 [General] Rename confusing method in tableHelper 2018-10-08 17:13:41 +03:00
David CernatandGitHub 2c7a8c7039 Merge pull request #46 from robsob91/0.7.0
Fixed crash caused by variable name that wasn't updated
2018-10-08 14:40:59 +03:00
David Cernat b368b386d9 [General] Update names for script functions that clear packet vectors 2018-10-03 02:28:54 +03:00
David Cernat 837d9bfd71 [General] Use LoadItemChanges() instead of LoadInventory() when possible 2018-10-02 13:15:12 +03:00
David Cernat 60224a06e8 [EventHandler] Don't resend entire inventory when players create records
This prevents bugs related to invalid item indexes in the potion creation window.
2018-10-01 18:58:53 +03:00
David Cernat 601d3040ea [Player] Add LoadItemChanges() for sending minimalist inventory packets 2018-10-01 18:56:05 +03:00
David Cernat afa2d7d134 [General] Update usage of inventory script functions 2018-10-01 18:51:41 +03:00
David Cernat a3f390515f [General] Add and use AddPlayerInventoryItemChange() in PacketBuilder 2018-09-24 04:56:35 +03:00
David Cernat c15af56892 [General] Remove unnecessary usage of tes3mp.GetName() 2018-09-21 04:23:04 +03:00
David Cernat 46698c1d18 [General] Shorten long lines 2018-09-21 04:16:48 +03:00
David Cernat 4dc340480e [General] Change code style by using "not" operator whenever possible 2018-09-21 03:14:24 +03:00
David Cernat ef226ef026 [Player] Delete items & spells using invalid generated records on log in
Additionally, remove unused nil check in LoadInventory()
2018-09-18 07:20:34 +03:00
David Cernat 1af08f3e71 [Player] Avoid saving souls for items w/o souls when saving inventory 2018-09-16 00:30:32 +03:00
David Cernat a15c9ed5dd [Player] Clean nil values when removing links to records 2018-09-13 21:19:30 +03:00
David Cernat 4c9b9ffc44 [Player] Use correct log level for debug message when saving inventory 2018-09-10 23:56:29 +03:00
nop 612b472231 Renamed forgotten variable 2018-09-08 16:32:32 -07:00
David Cernat 1c3e9ac808 [General] Clean up logging by using easily adjustable log level values 2018-09-08 19:11:27 +03:00
David Cernat 9cd5dc8556 [General] Implement dynamic records, part 2
Records are now split into 2 categories: permanent records and generated records.

Permanent records are kept forever once created and are sent to all players when they join the server.

Generated records are linked to players, cells or other records, are deleted once those links disappear, and are only sent to players who encounter them. For instance, if a player creates hundreds of potions in a house and then drops the potions there, those potion records will only be sent to players who enter that house. If the potions are drunk and there are no longer any instances of them, their associated records are deleted.

By default, permanent records are created by using the /createrecord command after specifically setting an ID for the record about to be created.

Generated records are created through regular gameplay or by using the /createrecord command without specifying an ID for the record.
2018-08-30 03:32:58 +03:00
David Cernat be40d64c28 [CommandHandler] Remove outdated menu for invalid usage of /createrecord 2018-08-28 21:53:26 +03:00
David Cernat 6684326e5e [General] Rename BaseWorld's loadedRegions into storedRegions
There was a discrepancy in the meaning of "loaded" between the LoadedCells table and BaseWorld's loadedRegions table. The former contained only currently loaded cells, while the latter contained all the regions that had ever been loaded since the start of the server. To remove the inconsistency, the latter has been renamed.
2018-08-27 23:16:01 +03:00
David Cernat 0835c301cd [GuiHelper] Use tableHelper.enum() instead of separate enum() function 2018-08-27 23:00:30 +03:00
David Cernat c3f4f771cc [General] Rename guiIds into guiHelper 2018-08-27 22:35:19 +03:00
David Cernat 2ab7ec43df [General] Add /regions command to display loaded regions & authorities
Additionally, clean up guiIds.
2018-08-27 22:13:31 +03:00
David Cernat 88d7f47799 [General] Rename settings.admin into settings.staffRank for players 2018-08-27 16:02:02 +03:00
David Cernat a54d498f76 [General] Add server owner rank & commands for promoting/demoting admins
Additionally, remove unused PromoteModerator() method in BasePlayer.
2018-08-27 15:33:27 +03:00
David Cernat d936960a33 [Player] Rermove menu-toggling no longer needed when denying equipment 2018-08-27 14:19:27 +03:00
David Cernat 2d18c05c8d [CommandHandler] Don't let /createrecord with too many args go through
I've noticed myself using /createrecord by mistake when I mean to use /storerecord, which sometimes undesirable consequences, hence this change.
2018-08-27 12:22:01 +03:00
David Cernat af56be8881 [Cell] Make all players have data for spawned actors entering cell
This fixes remaining problems from 7a4495c9c9 by spawning every cell-changing NPC for everyone who isn't already a visitor to the cell that NPC is in.
2018-08-27 11:45:06 +03:00
David Cernat 2142b14968 [General] Log chat names instead of pids for players whenever possible 2018-08-26 07:55:53 +03:00
David Cernat 3174c9ed17 [General] Log triggering of PlayerEquipment and PlayerInventory events 2018-08-26 07:50:08 +03:00
David Cernat a3a61e11af [LogicHandler] Print chat names for players loading/unloading regions 2018-08-26 07:29:50 +03:00
David Cernat 7a4495c9c9 [Cell] Ensure cell visitors have data for spawned actors entering cell
This should greatly alleviate one of the main remaining sources of desync.
2018-08-26 06:55:52 +03:00
David Cernat cc718bbffb [Cell] Remove unused IsExterior() method 2018-08-26 03:44:17 +03:00