Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate

Autor Topic: Player refresh function  (Visto 725 veces)

0 Miembros and 1 Guest are viewing this topic.

Offline zodiacddos Posteado: January 26, 2021, 11:46:03 PM

  • +1 puntos por ventas
  • *
  • Rank: Liga mayor
  • Posts: 189
  • Gracias recibida: 6738
  • ph
Player refresh function

STRUCTS :

Code: [Select]
struct PMSG_CHARMAPJOINRESULT
{
// static data ------------------------------------

// non-static data --------------------------------
/ * <thisrel this + 0x0> * / / * | 0x3 | * / struct PBMSG_HEAD h;
/ * <thisrel this + 0x3> * / / * | 0x1 | * / unsigned char subcode;
/ * <thisrel this + 0x4> * / / * | 0x1 | * / unsigned char MapX;
/ * <thisrel this + 0x5> * / / * | 0x1 | * / unsigned char MapY;
/ * <thisrel this + 0x6> * / / * | 0x1 | * / unsigned char MapNumber;
/ * <thisrel this + 0x7> * / / * | 0x1 | * / unsigned char Dir;
/ * <thisrel this + 0x8> * / / * | 0x4 | * / unsigned long Exp;
/ * <thisrel this + 0xc> * / / * | 0x4 | * / unsigned long NextExp;
/ * <thisrel this + 0x10> * / / * | 0x2 | * / unsigned short LevelUpPoint;
/ * <thisrel this + 0x12> * / / * | 0x2 | * / unsigned short Str;
/ * <thisrel this + 0x14> * / / * | 0x2 | * / unsigned short Dex;
/ * <thisrel this + 0x16> * / / * | 0x2 | * / unsigned short Vit;
/ * <thisrel this + 0x18> * / / * | 0x2 | * / unsigned short Energy;
/ * <thisrel this + 0x1a> * / / * | 0x2 | * / unsigned short Life;
/ * <thisrel this + 0x1c> * / / * | 0x2 | * / unsigned short MaxLife;
/ * <thisrel this + 0x1e> * / / * | 0x2 | * / unsigned short Mana;
/ * <thisrel this + 0x20> * / / * | 0x2 | * / unsigned short MaxMana;
/ * <thisrel this + 0x22> * / / * | 0x2 | * / unsigned short BP;
/ * <thisrel this + 0x24> * / / * | 0x2 | * / unsigned short MaxBP;
/ * <thisrel this + 0x28> * / / * | 0x4 | * / int Money;
/ * <thisrel this + 0x2c> * / / * | 0x1 | * / unsigned char PkLevel;
/ * <thisrel this + 0x2d> * / / * | 0x1 | * / unsigned char CtlCode;
/ * <thisrel this + 0x2e> * / / * | 0x2 | * / short AddPoint;
/ * <thisrel this + 0x30> * / / * | 0x2 | * / short MaxAddPoint;

// base classes -----------------------------------

// friends ----------------------------------------

// static functions -------------------------------

// non-virtual functions --------------------------

// virtual functions ------------------------------
};

struct PMSG_CHARREGEN
{
PBMSG_HEAD h;
char subcode;
char MapX;
char MapY;
char MapNumber;
char Dir;
unsigned short Life;
unsigned short Mana;
unsigned short BP;
unsigned int Exp;
unsigned int Money;
};

FUNCTION:

Citar
void Functions :: PlayerRefresh (DWORD aIndex)
{   
   // ------------------------------------------------ ------------
   // CHAR MAP JOIN - SEND [CREATE]
   // ------------------------------------------------ ------------
   PMSG_CHARMAPJOINRESULT lpMsg;
   lpMsg.hc = 0xC3;
   lpMsg.h.head = 0xF3;
   lpMsg.h.size = 0x33;
   lpMsg.subcode = 0x03;
   lpMsg.MapX = lpObj [aIndex] .X;
   lpMsg.MapY = lpObj [aIndex] .Y;
   lpMsg.MapNumber = lpObj [aIndex] .MapNumber;
   lpMsg.Dir = lpObj [aIndex] .Dir;
   lpMsg.Exp = lpObj [aIndex] .Experience;
   lpMsg.NextExp = lpObj [aIndex] .NextExp;
   lpMsg.LevelUpPoint = lpObj [aIndex] .LevelUpPoints;
   lpMsg.Str = lpObj [aIndex] .Strength;
   lpMsg.Dex = lpObj [aIndex] .Dexterity;
   lpMsg.Vit = lpObj [aIndex] .Vitality;
   lpMsg.Energy = lpObj [aIndex] .Energy;
   lpMsg.Money = lpObj [aIndex] .Money;
   lpMsg.PkLevel = lpObj [aIndex] .PK_Level;
   lpMsg.Life = (short) lpObj [aIndex] .Life;
   lpMsg.MaxLife = (short) ((double) lpObj [aIndex] .AddLife + lpObj [aIndex] .MaxLife);
   lpMsg.Mana = (short) lpObj [aIndex] .Mana;
   lpMsg.MaxMana = (short) ((double) lpObj [aIndex] .AddMana + lpObj [aIndex] .MaxMana);
   lpMsg.CtlCode = (short) lpObj [aIndex] .Authority;
   lpMsg.BP = lpObj [aIndex] .BP;
   lpMsg.MaxBP = lpObj [aIndex] .AddBP + lpObj [aIndex] .MaxBP;
   DataSend (aIndex, & lpMsg.hc, (DWORD) lpMsg.h.size);

   // ------------------------------------------------ ------------
   // CHAR REGEN - SEND [DESTROY]
   // ------------------------------------------------ ------------
   PMSG_CHARREGEN pMsg;
   pMsg.hc = 0xC1;
   pMsg.h.head = 0xF3;
   pMsg.h.size = 0x24;
   pMsg.subcode = 0x04;
   pMsg.Dir = lpObj [aIndex] .Dir;
   pMsg.MapX = LOBYTE (lpObj [aIndex] .X);
   pMsg.MapY = LOBYTE (lpObj [aIndex] .Y);
   pMsg.Life = (float) lpObj [aIndex] .Life;
   pMsg.Mana = (float) lpObj [aIndex] .Mana;
   pMsg.Exp = lpObj [aIndex] .Experience;
   pMsg.MapNumber = lpObj [aIndex] .MapNumber;
   pMsg.Money = lpObj [aIndex] .Money;
   pMsg.BP = LOWORD (lpObj [aIndex] .BP);
   pObj [aIndex] .PathCount = 0;
   DataSend (aIndex, & pMsg.hc, (DWORD) pMsg.h.size);

   gObjTeleport (aIndex, lpObj [aIndex] .MapNumber, lpObj [aIndex] .X, lpObj [aIndex] .Y);
   GCItemListSend (aIndex);
   CGRequestQuestInfo (aIndex);
   DGGuildMemberInfoRequest (aIndex);
}

DEFINES:





Solo usuarios registrados pueden comentar y agradecer, Logueate o Registrate


 

Related Topics

  Subject / Started by Replies Last post
20 Replies
7493 Views
Last post February 13, 2019, 12:20:17 PM
by -Rastaa.TSM☢
4 Replies
1004 Views
Last post July 23, 2018, 08:33:43 PM
by Cartman
15 Replies
2843 Views
Last post May 26, 2020, 05:55:54 PM
by kayito
9 Replies
2451 Views
Last post August 08, 2021, 06:26:05 PM
by onlinezajzaj
1 Replies
1659 Views
Last post August 21, 2023, 04:12:42 PM
by wellwisher22