mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-05 06:50:04 +00:00
Use PC_MAXHEALTH() in the rest of the codebase.
+ minor fixups
This commit is contained in:
parent
113ecc8f60
commit
321dca3f79
@ -153,11 +153,11 @@ int Database::createCharacter(sP_CL2LS_REQ_SAVE_CHAR_NAME* save, int AccountID)
|
||||
create.EyeColor = 1;
|
||||
create.FaceStyle = 1;
|
||||
create.Gender = 1;
|
||||
create.HP = 1000;
|
||||
create.Level = 1;
|
||||
create.HP = PC_MAXHEALTH(create.Level);
|
||||
create.HairColor = 1;
|
||||
create.HairStyle = 1;
|
||||
create.Height = 0;
|
||||
create.Level = 1;
|
||||
create.SkinColor = 1;
|
||||
create.isGM = settings::GM;
|
||||
create.x_coordinates = settings::SPAWN_X;
|
||||
|
@ -8,6 +8,7 @@
|
||||
* implementing just yet anyway.
|
||||
*/
|
||||
|
||||
// floats
|
||||
const float VALUE_BATTERY_EMPTY_PENALTY = 0.5f;
|
||||
const float CN_EP_RANK_1 = 0.8f;
|
||||
const float CN_EP_RANK_2 = 0.7f;
|
||||
@ -15,6 +16,7 @@ const float CN_EP_RANK_3 = 0.5f;
|
||||
const float CN_EP_RANK_4 = 0.3f;
|
||||
const float CN_EP_RANK_5 = 0.29f;
|
||||
|
||||
// nano powers
|
||||
enum {
|
||||
EST_NONE = 0,
|
||||
EST_DAMAGE = 1,
|
||||
|
@ -184,6 +184,7 @@ void NanoManager::addNano(CNSocket* sock, int16_t nanoId, int16_t slot) {
|
||||
resp.Nano.iStamina = 150;
|
||||
resp.iQuestItemSlotNum = slot;
|
||||
resp.iPC_Level = level;
|
||||
resp.iPC_FusionMatter = plr->fusionmatter; // will decrese in actual nano missions
|
||||
|
||||
// Update player
|
||||
plr->Nanos[nanoId] = resp.Nano;
|
||||
@ -311,7 +312,7 @@ bool doDebuff(CNSocket *sock, int32_t *pktdata, sSkillResult_Damage_N_Debuff *re
|
||||
mob->appearanceData.iHP -= amount;
|
||||
|
||||
if (mob->appearanceData.iHP <= 0)
|
||||
MobManager::giveReward(sock);
|
||||
MobManager::killMob(sock, mob);
|
||||
|
||||
respdata[i].eCT = 4;
|
||||
respdata[i].iDamage = amount;
|
||||
@ -352,6 +353,7 @@ bool doHeal(CNSocket *sock, int32_t *pktdata, sSkillResult_Heal_HP *respdata, in
|
||||
}
|
||||
}
|
||||
|
||||
// player not found
|
||||
if (plr == nullptr)
|
||||
return false;
|
||||
|
||||
@ -381,7 +383,7 @@ bool doDamage(CNSocket *sock, int32_t *pktdata, sSkillResult_Damage *respdata, i
|
||||
mob->appearanceData.iHP -= amount;
|
||||
|
||||
if (mob->appearanceData.iHP <= 0)
|
||||
MobManager::giveReward(sock);
|
||||
MobManager::killMob(sock, mob);
|
||||
|
||||
respdata[i].eCT = 4;
|
||||
respdata[i].iDamage = amount;
|
||||
@ -431,7 +433,7 @@ bool doLeech(CNSocket *sock, int32_t *pktdata, sSkillResult_Heal_HP *healdata, i
|
||||
mob->appearanceData.iHP -= amount;
|
||||
|
||||
if (mob->appearanceData.iHP <= 0)
|
||||
MobManager::giveReward(sock);
|
||||
MobManager::killMob(sock, mob);
|
||||
|
||||
damagedata->eCT = 4;
|
||||
damagedata->iDamage = amount;
|
||||
|
@ -633,7 +633,7 @@ void PlayerManager::revivePlayer(CNSocket* sock, CNPacketData* data) {
|
||||
plr->x = target.x;
|
||||
plr->y = target.y;
|
||||
plr->z = target.z;
|
||||
plr->HP = 1000 * plr->level;
|
||||
plr->HP = PC_MAXHEALTH(plr->level);
|
||||
|
||||
// Response parameters
|
||||
response.PCRegenData.iActiveNanoSlotNum = plr->activeNano;
|
||||
|
Loading…
Reference in New Issue
Block a user