mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed item's unique ID being reset by a non-unique item (closes #582)
This commit is contained in:
@@ -76,9 +76,13 @@ void Objects::SetNewEngineID(fo::GameObject* obj) {
|
||||
static __declspec(naked) void item_identical_hack() {
|
||||
using namespace fo::Fields;
|
||||
__asm {
|
||||
mov ecx, [edi]; // item id
|
||||
mov ecx, [edi]; // place_item id
|
||||
cmp ecx, Start; // start unique ID
|
||||
jg notIdentical;
|
||||
mov ecx, [esi]; // inv_item id
|
||||
cmp ecx, Start; // start unique ID
|
||||
jg notIdentical;
|
||||
// engine code
|
||||
mov eax, [esi + scriptId];
|
||||
cmp eax, ebx;
|
||||
notIdentical:
|
||||
|
||||
Reference in New Issue
Block a user