Autor Tema: [Sources] Enable Guild Asistant get Siege Crown  (Leído 7810 veces)

Applayo

  • Newbie
  • *
  • Mensajes: 40
  • : 2
  • Applayo
    • Ver Perfil
[Sources] Enable Guild Asistant get Siege Crown
« en: Abril 02, 2021, 02:37:46 pm »
Esto sirve para MuEmu para habilitar que el Asistente de la alianza atacante del Castle Siege pueda acumular tiempo y coronar durante el mismo

Por:
Isso é usado por MuEmu para permitir que o Castle Siege Attacking Alliance Wizard acumule tempo e coroa durante o processo.

[hide post=1 login=1]
En la función
Code:

void CNpcTalk::NpcCastleSiegeCrown(LPOBJ lpNpc, LPOBJ lpObj)


Buscar:
Code: [Select]

if (gCastleSiege.CheckUnionGuildMaster(lpObj->Index) == FALSE)


y reemplazar por:
Code:

if (gCastleSiege.CheckUnionGuildMaster(lpObj->Index) == FALSE && gCastleSiege.CheckCrownGuildAsistant(lpObj->Index) == FALSE)


Luego en CastleSiege.h agregar debajo de int CheckUnionGuildMaster(int iIndex);

Code:

bool CheckCrownGuildAsistant(int iIndex);


y en CastleSiege.cpp debajo de la función int CCastleSiege::CheckUnionGuildMaster(int iIndex) agregar:

Code:

bool CCastleSiege::CheckCrownGuildAsistant(int iIndex)
{
   GUILD_INFO_STRUCT* lpGuildInfo;

   if (gObjIsConnected(iIndex) == FALSE)
   {
      return FALSE;
   }

   lpGuildInfo = gObj[iIndex].Guild;

   if (lpGuildInfo == NULL)
   {
      return FALSE;
   }

   if (gObj[iIndex].GuildStatus == GUILD_ASSISTANT)
   {
      if ((lpGuildInfo->Number == lpGuildInfo->GuildUnion) || (lpGuildInfo->GuildUnion == 0))
      {
         return TRUE;
      }
   }

   return FALSE;
}[/hide]

Credito: Kayito

rototo

  • Newbie
  • *
  • Mensajes: 7
  • : 2
    • Ver Perfil
Re: [Sources] Enable Guild Asistant get Siege Crown
« Respuesta #1 en: Abril 04, 2021, 10:10:51 pm »
Justo lo que estaba buscando!

robins1998

  • Newbie
  • *
  • Mensajes: 40
  • : 0
    • Ver Perfil
Re: [Sources] Enable Guild Asistant get Siege Crown
« Respuesta #2 en: Mayo 27, 2021, 02:46:12 am »
Very helpful, thanks for sharing.