Jump to content
  • 0

Question

Posted

Guys, would this be a request or support HAHA
Does anyone have or know how to make this mod compatible with eAthena?

 

Quote

 db/castle_db.txt | 1 +
 src/map/battle.c | 7 +++++++
 src/map/battle.h | 1 +
 3 files changed, 9 insertions(+)

diff --git a/db/castle_db.txt b/db/castle_db.txt
index 5b2fd60..6cdf111 100644
--- a/db/castle_db.txt
+++ b/db/castle_db.txt
@@ -43,3 +43,4 @@
 31,arug_cas03,Horn,Manager#arug_cas03            // kRO : Horn
 32,arug_cas04,Gefn,Manager#arug_cas04            // kRO : Gefn
 33,arug_cas05,Bandis,Manager#arug_cas05            // kRO : Bandis
+100,guild_vs1,King of Emperium Hill,koe
\ No newline at end of file
diff --git a/src/map/battle.c b/src/map/battle.c
index 7859f95..9120b33 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7001,6 +7001,13 @@ int battle_check_target( struct block_list *src, struct block_list *target,int f
     if( (s_bl = battle_get_master(src)) == NULL )
         s_bl = src;
 
+    if ( s_bl->type == BL_PC && t_bl->type == BL_MOB ) {
+        struct map_session_data *sd = BL_CAST( BL_PC, s_bl );
+        if ( ( ( (TBL_MOB*)target )->mob_id == 1288 && !strcmp( mapindex_id2name(sd->mapindex), "guild_vs1" ) ) &&
+            ( sd->status.guild_id == mapreg_readreg( add_str("$koegid") ) || battle_getcurrentskill(src) > 0 ) )
+        return 0;
+    }
+
     if ( s_bl->type == BL_PC ) {
         switch( t_bl->type ) {
             case BL_MOB: // Source => PC, Target => MOB
diff --git a/src/map/battle.h b/src/map/battle.h
index 5cdaebb..d7c14b5 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -7,6 +7,7 @@
 #include "../common/mmo.h"
 #include "../config/core.h"
 #include "map.h" //ELE_MAX
+#include "mapreg.h"
 
 /// State of a single attack attempt; used in flee/def penalty calculations when mobbed
 typedef enum damage_lv {
 

I even tried some modifications here, but I don't have good knowledge of src code.

shows this error in the emulator.

Quote

battle.c:3584:30: error: ‘TBL_MOB’ has no member named ‘mob_id’
   if ( ( ( (TBL_MOB*)target )->mob_id == 1288 && !strcmp( mapindex_id2name(sd->mapindex), "pvp_y_1-5" ) ) &&

Anyone who can help, thank you in advance

 

 

1 answer to this question

Recommended Posts

  • 0
Posted
On 12/22/2024 at 11:00 AM, Yukaiii said:

Guys, would this be a request or support HAHA
Does anyone have or know how to make this mod compatible with eAthena?

 

I even tried some modifications here, but I don't have good knowledge of src code.

shows this error in the emulator.

Anyone who can help, thank you in advance

 

 

There is no mob_id in eAthena it was class_ 

 

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...