Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EnableFlagAnimation patch #189

Open
wants to merge 1 commit into
base: rock_win32
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Inputs/NemoMap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -355,4 +355,6 @@

#--- To be implemented in WARP ---
# 338 : ValidateClient
#---------------------------------
#---------------------------------

350 : EnableFlagAnimation
6 changes: 6 additions & 0 deletions Patches/UI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,12 @@ CustomUI:
author : CH.C (jchcc)
desc : Fix issue in homunculus AI which prevents automatic attacks (present in clients 20170920 clients and newer).

- EnableFlagAnimation:
title : Enable WoE Flag Animation
recommend : no
author : Sapito Sucio
desc : Restores WoE flag's animation, disabled by Gravity long ago.

CaseInsensitiveSearch:
title: CASE INSENSITIVE SEARCH
mutex: false
Expand Down
62 changes: 62 additions & 0 deletions Scripts/Patches/EnableFlagAnimation.qjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
/**************************************************************************\
* *
* Copyright (C) 2025 *
* *
* This file is a part of WARP project (specific to RO clients) *
* *
* WARP is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* You should have received a copy of the GNU General Public License *
* along with this program. If not, see <http://www.gnu.org/licenses/>. *
* *
* *
|**************************************************************************|
* *
* Author(s) : Sapito Sucio *
* Created Date : 2025-01-11 *
* Last Modified : 2025-01-11 *
* *
\**************************************************************************/

///
/// \brief Change the PUSH 5 to PUSH 1 for guild flag animation
///
EnableFlagAnimation = function()
{
const _ = 'EnableFlagAnimation : ';

$$(_ + '1.1 - Find the guild flag model string reference')
const addr = Exe.FindText("model\\3dmob\\guildflag90_1.gr2");
if (addr < 0)
throw Error("Guild flag model string not found");

$$(_ + '1.2 - Find where it is used in a PUSH')
const code =
PUSH_0 //push 0
+ PUSH(5) //push 5
+ PUSH(addr) //push offset "model\3dmob\guildflag90_1.gr2"
;

const pushAddr = Exe.FindHex(code);
if (pushAddr < 0)
throw Error("Pattern not found");

$$(_ + '2 - Change PUSH 5 to PUSH 1')
Exe.SetUint8(pushAddr + 3, 1);

return true;
};

///
/// \brief Disable for unsupported clients
///
EnableFlagAnimation.validate = () =>
true; // Patch should work on all clients
2 changes: 2 additions & 0 deletions Tables/Patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -320,3 +320,5 @@
#--- To be implemented in WARP ---
# 338 : ValidateClient
#---------------------------------

350 : EnableFlagAnimation