Skip to content

RegisterInstanceEvent( instance_id, event, function ) does not fire #62

@55Honey

Description

@55Honey

Tested with

function InitInstance(event, instance_data, map)
    print("InitInstance 1")
end
function LoadInstance(event, instance_data, map)
    print("LoadInstance 2")
end
function UpdateInstance(event, instance_data, map)
    print("UpdateInstance 3")
end
function PlayerEnterInstance(event, instance_data, map)
    print("PlayerEnterInstance 4")
end
function CreatureCreateInInstance(event, instance_data, map)
    print("CreatureCreateInInstance 5")
end
function GOCreateInInstance(event, instance_data, map)
    print("GOCreateInInstance 6")
end
function EncounterInProgress(event, instance_data, map)
    print("EncounterInProgress 7")
end

RegisterInstanceEvent(36, 1, InitInstance, 0)
RegisterInstanceEvent(36, 2, LoadInstance, 0)
RegisterInstanceEvent(36, 3, UpdateInstance, 0)
RegisterInstanceEvent(36, 4, PlayerEnterInstance, 0)
RegisterInstanceEvent(36, 5, CreatureCreateInInstance, 0)
RegisterInstanceEvent(36, 6, GOCreateInInstance, 0)
RegisterInstanceEvent(36, 7, EncounterInProgress, 0)

https://github.com/azerothcore/mod-eluna/blob/684eb0335bacc81110e75e36830204dea90c45c3/src/ElunaLuaEngine_SC.cpp#L242

As you may see, sEluna->GetInstanceData is called to create a new instance data, but it is assigned to instanceData which is actually just a local variable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions