Handle Replace3D in callback in trigger script
This commit is contained in:
parent
fd89a8ee0d
commit
4c9ab4bef2
BIN
Bazaar Realm.esp
BIN
Bazaar Realm.esp
Binary file not shown.
Binary file not shown.
BIN
Scripts/BRFetchPlayerAliasScript.pex
Normal file
BIN
Scripts/BRFetchPlayerAliasScript.pex
Normal file
Binary file not shown.
BIN
Scripts/BRFetchThread.pex
Normal file
BIN
Scripts/BRFetchThread.pex
Normal file
Binary file not shown.
BIN
Scripts/BRFetchThreadManager.pex
Normal file
BIN
Scripts/BRFetchThreadManager.pex
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -5,11 +5,11 @@ Quest Property BRQuest Auto
|
|||||||
|
|
||||||
event OnMenuClose(string menuName)
|
event OnMenuClose(string menuName)
|
||||||
if menuName == "ContainerMenu"
|
if menuName == "ContainerMenu"
|
||||||
debug.Trace("Peddling container menu closed")
|
debug.Trace("BRMerchChestScript container menu closed")
|
||||||
BRQuestScript BRScript = BRQuest as BRQuestScript
|
BRQuestScript BRScript = BRQuest as BRQuestScript
|
||||||
int result = BRMerchandiseList.Create(BRScript.ApiUrl, BRScript.ApiKey, BRScript.ShopId, self)
|
int result = BRMerchandiseList.Create(BRScript.ApiUrl, BRScript.ApiKey, BRScript.ShopId, self)
|
||||||
if result == -2
|
if result == -2
|
||||||
Debug.Trace("No container changes to save to the server")
|
Debug.Trace("BRMerchChestScript no container changes to save to the server")
|
||||||
elseif result == -1
|
elseif result == -1
|
||||||
Debug.MessageBox("Failed to save shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
Debug.MessageBox("Failed to save shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
||||||
else
|
else
|
||||||
@ -22,7 +22,7 @@ endEvent
|
|||||||
|
|
||||||
event OnActivate(ObjectReference akActionRef)
|
event OnActivate(ObjectReference akActionRef)
|
||||||
if akActionRef == PlayerRef
|
if akActionRef == PlayerRef
|
||||||
debug.Trace("Peddling container was opened")
|
debug.Trace("BRMerchChestScript container was opened")
|
||||||
RegisterForMenu("ContainerMenu")
|
RegisterForMenu("ContainerMenu")
|
||||||
endif
|
endif
|
||||||
endEvent
|
endEvent
|
@ -16,12 +16,7 @@ Event OnActivate(ObjectReference akActionRef)
|
|||||||
BRQuestScript BRScript = BRQuest as BRQuestScript
|
BRQuestScript BRScript = BRQuest as BRQuestScript
|
||||||
bool result = BRMerchandiseList.NextPage(BRScript.ApiUrl, BRScript.ApiKey, BRScript.MerchandiseListId, MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkMerchChest, BRLinkItemRef, BRLinkMerchToggle, BRLinkMerchNext, BRLinkMerchPrev)
|
bool result = BRMerchandiseList.NextPage(BRScript.ApiUrl, BRScript.ApiKey, BRScript.MerchandiseListId, MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkMerchChest, BRLinkItemRef, BRLinkMerchToggle, BRLinkMerchNext, BRLinkMerchPrev)
|
||||||
debug.Trace("BRMerchandiseList.NextPage result: " + result)
|
debug.Trace("BRMerchandiseList.NextPage result: " + result)
|
||||||
if result
|
if !result
|
||||||
while !BRMerchandiseList.Replace3D(MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkItemRef)
|
|
||||||
Debug.Trace("BRMerchandiseList.Replace3D returned false, waiting and trying again")
|
|
||||||
Utility.Wait(0.05)
|
|
||||||
endWhile
|
|
||||||
else
|
|
||||||
Debug.MessageBox("Failed to load shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
Debug.MessageBox("Failed to load shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -16,12 +16,7 @@ Event OnActivate(ObjectReference akActionRef)
|
|||||||
BRQuestScript BRScript = BRQuest as BRQuestScript
|
BRQuestScript BRScript = BRQuest as BRQuestScript
|
||||||
bool result = BRMerchandiseList.PrevPage(BRScript.ApiUrl, BRScript.ApiKey, BRScript.MerchandiseListId, MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkMerchChest, BRLinkItemRef, BRLinkMerchToggle, BRLinkMerchNext, BRLinkMerchPrev)
|
bool result = BRMerchandiseList.PrevPage(BRScript.ApiUrl, BRScript.ApiKey, BRScript.MerchandiseListId, MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkMerchChest, BRLinkItemRef, BRLinkMerchToggle, BRLinkMerchNext, BRLinkMerchPrev)
|
||||||
debug.Trace("BRMerchandiseList.PrevPage result: " + result)
|
debug.Trace("BRMerchandiseList.PrevPage result: " + result)
|
||||||
if result
|
if !result
|
||||||
while !BRMerchandiseList.Replace3D(MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkItemRef)
|
|
||||||
Debug.Trace("BRMerchandiseList.Replace3D returned false, waiting and trying again")
|
|
||||||
Utility.Wait(0.05)
|
|
||||||
endWhile
|
|
||||||
else
|
|
||||||
Debug.MessageBox("Failed to load shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
Debug.MessageBox("Failed to load shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -16,13 +16,21 @@ Event OnActivate(ObjectReference akActionRef)
|
|||||||
BRQuestScript BRScript = BRQuest as BRQuestScript
|
BRQuestScript BRScript = BRQuest as BRQuestScript
|
||||||
bool result = BRMerchandiseList.Toggle(BRScript.ApiUrl, BRScript.ApiKey, BRScript.MerchandiseListId, MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkMerchChest, BRLinkItemRef, BRLinkMerchToggle, BRLinkMerchNext, BRLinkMerchPrev)
|
bool result = BRMerchandiseList.Toggle(BRScript.ApiUrl, BRScript.ApiKey, BRScript.MerchandiseListId, MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkMerchChest, BRLinkItemRef, BRLinkMerchToggle, BRLinkMerchNext, BRLinkMerchPrev)
|
||||||
debug.Trace("BRMerchandiseList.Toggle result: " + result)
|
debug.Trace("BRMerchandiseList.Toggle result: " + result)
|
||||||
if result
|
if !result
|
||||||
while !BRMerchandiseList.Replace3D(MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkItemRef)
|
|
||||||
Debug.Trace("BRMerchandiseList.Replace3D returned false, waiting and trying again")
|
|
||||||
Utility.Wait(0.05)
|
|
||||||
endWhile
|
|
||||||
else
|
|
||||||
Debug.MessageBox("Failed to load or clear shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
Debug.MessageBox("Failed to load or clear shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
EndEvent
|
||||||
|
|
||||||
|
Event OnLoadMerchandise(bool result)
|
||||||
|
debug.Trace("BRMerchToggleScript OnLoadMerchandise result: " + result)
|
||||||
|
if result
|
||||||
|
ObjectReference MerchantShelf = self.GetLinkedRef(BRLinkMerchShelf)
|
||||||
|
while !BRMerchandiseList.Replace3D(MerchantShelf, PlaceholderStatic, BRLinkMerchShelf, BRLinkItemRef)
|
||||||
|
Debug.Trace("BRMerchandiseList.Replace3D returned false, waiting and trying again")
|
||||||
|
Utility.Wait(0.05)
|
||||||
|
endWhile
|
||||||
|
else
|
||||||
|
Debug.MessageBox("Failed to load or clear shop merchandise. Please submit a bug on Nexus Mods with the contents of BazaarRealmPlugin.log and BazaarRealmClient.log usually located in C:\\Users\\<your user>\\Documents\\My Games\\Skyrim Special Edition\\SKSE.")
|
||||||
|
endif
|
||||||
EndEvent
|
EndEvent
|
Loading…
Reference in New Issue
Block a user