DarkflameUniverse / DarkflameServer

The main repository for the Darkflame Universe Server Emulator project.
https://www.darkflameuniverse.org/
GNU Affero General Public License v3.0
653 stars 173 forks source link

BUG: Spider queen is supposed to scream on the minion spiders deaths #307

Open Jettford opened 2 years ago

Jettford commented 2 years ago

Make sure you've done the following:

Issue Description

Spider queen is supposed to scream

Below is the lua function used in live

----------------------------------------------------------------
-- Catch Spiderling deaths in order to process when a wave ends 
----------------------------------------------------------------
function notifyDie(self, spiderlingID, msg)
    -- Get the game object of the child
    local child = spiderlingID

    -- Check to see if the child is Spiderling
    if(child:GetLOT().objtemplate ~= SpiderlingID) then return end

    -- Play the Spider Boss scream
    local screamEmitter = self:GetVar("ScreamEmitter")
    self:NotifyClientObject{name = "EmitScream", paramObj = screamEmitter}

    -- Grab the current wave death counter
    local deathCounter = self:GetVar("deathCounter") or 0

    -- Increment the counter
    deathCounter = deathCounter + 1
    self:SetVar("deathCounter", deathCounter)

    -- Grab the current wave count
    local currentStage = self:GetVar("CurrentBossStage") 
    local spiderWaveCnt = spiderWaveCntTable[currentStage]

    -- Have we finished the wave?
    if(deathCounter >= spiderWaveCnt) then
        -- Activate the Spider Boss
        WithdrawSpider(self, false)
    end

    -- Remove reference from the Spiderling table
    local spiderlingTable = self:GetVar("spiderlingTable") or {}
    -- Iterate through the table and find the dead Spiderling
    for i, sID in ipairs(spiderlingTable) do
        if(sID:GetID() == child:GetID()) then
            table.remove(spiderlingTable, i)
            break
        end
    end
    self:SetVar("spiderlingTable", spiderlingTable)

    -- Cancel the notification request
    self:SendLuaNotificationCancel{requestTarget = child, messageName = "Die"}

end

the particular snippet that begins with Play the Spider Boss scream is what triggered it in live, that snippet needs to be made into DLU C++ API based code and placed above https://github.com/DarkflameUniverse/DarkflameServer/blob/main/dScripts/BossSpiderQueenEnemyServer.cpp#L490

Reproduction steps

n/a

Expected Behavior

n/a

Environment

n/a

codeshaunted commented 2 years ago

Likely a wontfix, at least from the internal team. Not very high priority.

Jettford commented 2 years ago

Yeah, that's why I just left the lua

EmosewaMC commented 1 year ago

746