Skip to content

Commit b8d0305

Browse files
committed
Remove dead code
1 parent 5f124df commit b8d0305

3 files changed

Lines changed: 1 addition & 31 deletions

File tree

scripts/enumerations.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ enumerations.aiPrintableAction = { CANCEL = "cancelling current AI", ACTIVATE =
77
COMBAT = "initiating combat with", ESCORT = "escorting", FOLLOW = "following", TRAVEL = "travelling to",
88
WANDER = "wandering" }
99
enumerations.container = { SET = 0, ADD = 1, REMOVE = 2 }
10-
enumerations.containerSub = { NONE = 0, DRAG = 1, DROP = 2, TAKE_ALL = 3, REPLY_TO_REQUEST = 4, RESTOCK_RESULT = 5, TRADE = 6 }
10+
enumerations.containerSub = { NONE = 0, DRAG = 1, DROP = 2, TAKE_ALL = 3, REPLY_TO_REQUEST = 4, TRADE = 6 }
1111
enumerations.faction = { RANK = 0, EXPULSION = 1, REPUTATION = 2 }
1212
enumerations.inventory = { SET = 0, ADD = 1, REMOVE = 2 }
1313
enumerations.journal = { ENTRY = 0, INDEX = 1 }

scripts/eventHandler.lua

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -358,26 +358,6 @@ eventHandler.InitializeDefaultHandlers = function()
358358
tes3mp.SendObjectSound(true, true)
359359
end)
360360

361-
-- Print object restocking and send an ObjectRestock packet back to the player
362-
customEventHooks.registerHandler("OnObjectRestock", function(eventStatus, pid, cellDescription, objects, targetPlayers)
363-
364-
if eventStatus.validDefaultHandler == false then return end
365-
366-
local debugMessage = nil
367-
368-
for uniqueIndex, object in pairs(objects) do
369-
tes3mp.LogAppend(enumerations.log.INFO, "- Accepting restock request for " .. object.refId .. " " .. uniqueIndex)
370-
end
371-
372-
tes3mp.CopyReceivedObjectListToStore()
373-
-- Objects can't be restocked clientside without the server's approval, so we send
374-
-- the packet back to the player who sent it, but we avoid sending it to other
375-
-- players because the Container packet resulting from the restocking will get
376-
-- sent to them instead
377-
-- i.e. sendToOtherPlayers is false and skipAttachedPlayer is false
378-
tes3mp.SendObjectRestock(false, false)
379-
end)
380-
381361
end
382362

383363
eventHandler.OnPlayerConnect = function(pid, playerName)
@@ -1324,10 +1304,6 @@ eventHandler.OnObjectMiscellaneous = function(pid, cellDescription)
13241304
eventHandler.OnGenericObjectEvent(pid, cellDescription, "ObjectMiscellaneous")
13251305
end
13261306

1327-
eventHandler.OnObjectRestock = function(pid, cellDescription)
1328-
eventHandler.OnGenericObjectEvent(pid, cellDescription, "ObjectRestock")
1329-
end
1330-
13311307
eventHandler.OnObjectTrap = function(pid, cellDescription)
13321308
eventHandler.OnGenericObjectEvent(pid, cellDescription, "ObjectTrap")
13331309
end

scripts/serverCore.lua

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -575,12 +575,6 @@ function OnObjectMiscellaneous(pid, cellDescription)
575575
eventHandler.OnObjectMiscellaneous(pid, cellDescription)
576576
end
577577

578-
function OnObjectRestock(pid, cellDescription)
579-
tes3mp.LogMessage(enumerations.log.INFO, "Called \"OnObjectRestock\" for " .. logicHandler.GetChatName(pid) ..
580-
" and cell " .. cellDescription)
581-
eventHandler.OnObjectRestock(pid, cellDescription)
582-
end
583-
584578
function OnObjectTrap(pid, cellDescription)
585579
tes3mp.LogMessage(enumerations.log.INFO, "Called \"OnObjectTrap\" for " .. logicHandler.GetChatName(pid) ..
586580
" and cell " .. cellDescription)

0 commit comments

Comments
 (0)