Stats are set with 2 different messages. Base stats are set with F_PLAYER_STATS and stats from gear (and some bonus stats) are set with F_BAG_INFO (Only sent when client loads or player changes gear).
Here is F_PLAYER_STATS packet
struct F_PLAYER_STATS {
byte StatCount; //number of stats to be set in this packet
byte WeaponSpeed; //melee weapon and ranged weapon
byte Unk1;
byte Unk2;
byte BaseArmor;
byte BonusArmor;
byte Bolster;
byte EffectiveLevel;
Statistic Stats[StatCount];
};
struct Statistic{
byte StatisticType;
ushort Value;
};
Bonus stats. These stats are sums of all the stats from gear. They are set with F_BAG_INFO. (This operation is multi purpose, first byte determines what its going to do. To set stats, we set it to 0x19;
struct F_BAG_INFO{
byte Type = 0x19; //we want to set bonus stats.
byte StatCount = 0x62; //we are going to set 98 stats
BonusStat Stats[StatCount];
};
struct BonusStat{
ushort Value; //value in big endian notation
ushort Unk1;
ushort Unk2;
byte Unk3 = 0x80;
byte Unk4 = 0x3F;
};
//Here are stat indices within the stat array.
#define STRENGH 1;
#define WILLPOWER 3;
#define TOUGHNESS 4;
#define WOUNDS 5;
#define INIT 6;
#define WEAPON_SKILL 7;
#define BALLISTIC 8;
#define INT 9;
#define SPIRIT 14;
#define ELEMENTAL 15;
#define CORP 16;
#define PLUS_TO_ALL_DPS 24;
#define BLOCK 28;
#define PARRY 29;
#define DODGE 30;
#define DISRUPT 31;
#define WEAPON_SPEED 38;
#define ALL_CRIT_BONUS 42;
#define MELEE_CRIT 76;
#define RANGE_CRIT 77;
#define MAGIC_CRIT 78;
#define MELEE_POWER 80;
#define RANGE_POWER 81;
#define MAGIC_POWER 82;
#define HEALING_CRIT 89;
#define HEALING_POWER 94;
#define TOUGHNESS_POWER 96;
So if we want to set Healing crit to 25%, and 300 int from mastery/xp level and int from gear/liniments/buffs we would say:
F_PLAYER_STATS baseStats;
baseStats.Stats[INT].Value = 300;
//send packet
F_BAG_INFO info;
info.Stats[HEALING_CRIT].Value = 25;
info.Stats[INT].Value = IntSumFromAllGear;
info.Stats[MAGIC_POWER].Value = MagicPowerFromAllGear;
//send packet;
Examples:
Set with F_PLAYER_STATS (Notice, player is bolstered to level 15, as anyone in T1 entering RVR lakes should be. This also adjusts effective level. In previous section all calculations take level into consideration.)
![Image](http://oi62.tinypic.com/2585nae.jpg)
Setting of INT from gear, magic power, magic crit, healing power and healing crit using F_BAG_INFO
![Image](http://oi61.tinypic.com/9th108.jpg)