1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Greetings Guest!!

    In order to combat SPAM on the forums, all users are required to have a minimum of 2 posts before they can submit links in any post or thread.

    Dismiss Notice

ReleaseAll fix

Discussion in 'Pinco's UI' started by tirrag, Feb 23, 2014.

  1. tirrag

    tirrag Adventurer
    Stratics Veteran

    Joined:
    Jul 20, 2009
    Messages:
    78
    Likes Received:
    1
    It appeared the releaseall functionality was not working. I have a version I created. It has been working for me while training taming so I thought I would post it here. Swap out the EnhancePack.ReleasePet function located in the EnhancePack.lua file with the below code. Good luck!

    Code:
    function EnhancePack.ReleasePet(timePassed)
        if EnhancePack.ReleaseAll then
            EnhancePack.DeltaRelease = EnhancePack.DeltaRelease + timePassed
            if EnhancePack.DeltaRelease > EnhancePack.DelayRelease then
                EnhancePack.DeltaRelease = 0
               
                local petSize = table.getn(WindowData.Pets.PetId)
                local numPet
                for numPet = 1, petSize do
                    local name = WindowData.MobileName[WindowData.Pets.PetId[numPet]].MobName
                    local convName =string.gsub(WStringToString(name), "^%s*(.-)%s*$", "%1")
                    if(IsMobile(WindowData.Pets.PetId[numPet]) and not wstring.find(name, L"ReleasePet")) then
                        if ((wstring.find(wstring.lower(name), L"elemental") or CreaturesDB.IsDaemon(string.lower(convName)) and string.find(convName, " ")) or string.find(convName, " ")) then
                            EnhancePack.DelayRelease = 1
                           
                            WindowData.Pets.RenameId = WindowData.Pets.PetId[numPet]
                            WindowData.Pets.Name = WStringToString(L"ReleasePet") .. tostring(numPet)
                            BroadcastEvent(SystemData.Events.RENAME_MOBILE)   
                            return
                        end
                    end
                end
    
                for numPet = 1, petSize do
                    local name = WindowData.MobileName[WindowData.Pets.PetId[numPet]].MobName
                    if(IsMobile(WindowData.Pets.PetId[numPet]) and wstring.find(name, L"ReleasePet")) then
                        SendChat( ChatSettings.Channels[ SystemData.ChatLogFilters.SAY ], L"ReleasePet" .. StringToWString(tostring(numPet)) .. L" release" )
                    end
                end
               
                EnhancePack.ReleaseAll = false
                EnhancePack.DelayRelease = 0.3
            end
        end
    end
    
     
  2. Pinco

    Pinco UOEC Modder
    Stratics Veteran Stratics Legend

    Joined:
    Jul 25, 2005
    Messages:
    5,675
    Likes Received:
    865
    It's always a bad idea fix things by yourself, mainly because every patch will override them. If something doesn't work just report it, I don't think I've ever delayed a fix when reported :p
     
  3. tirrag

    tirrag Adventurer
    Stratics Veteran

    Joined:
    Jul 20, 2009
    Messages:
    78
    Likes Received:
    1
    greetings Pinco :) first thank you again for your wonderful UI! you are correct this will be overwritten each update. I thought this was a known issue based on this post. Hopefully it can be resolved. I will consider this the bug report then :) Keep up the great work!
     
  4. Pinco

    Pinco UOEC Modder
    Stratics Veteran Stratics Legend

    Joined:
    Jul 25, 2005
    Messages:
    5,675
    Likes Received:
    865
    I do not consider any bug reports on stratics as I said many other times in the past, because there are several other forums and I don't have time to track all of them.
    So I consider only the reports through the ingame bug reports (that works ONLY if you have EC playsound enabled), or in my forum (my signature link).
     
  5. tirrag

    tirrag Adventurer
    Stratics Veteran

    Joined:
    Jul 20, 2009
    Messages:
    78
    Likes Received:
    1
    Hi Pinco. I tried to register on your forum but when I clicked register I received the following message:
     
  6. Pinco

    Pinco UOEC Modder
    Stratics Veteran Stratics Legend

    Joined:
    Jul 25, 2005
    Messages:
    5,675
    Likes Received:
    865
    Read here