Added class-specific exp messages for non-english languages

Fixed status effect loss message not being sent
Fixed party bug where people in the same party were considered to be in different parties
This commit is contained in:
yogurt
2018-05-28 16:28:44 -05:00
parent 0739532c7d
commit 0f7e6f359d
4 changed files with 36 additions and 18 deletions

View File

@@ -191,7 +191,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
else
LuaEngine.CallLuaStatusEffectFunction(this.owner, newEffect, "onGain", this.owner, newEffect);
effects.Add(newEffect.GetStatusEffectId(), newEffect);
newEffect.SetSilent(silent);
//newEffect.SetSilent(silent);
newEffect.SetHidden(hidden);
if (!newEffect.GetHidden())
@@ -203,16 +203,12 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
index = Array.IndexOf(owner.charaWork.status, newEffect.GetStatusId());
else
index = Array.IndexOf(owner.charaWork.status, (ushort) 0);
//owner.charaWork.status[index] = newEffect.GetStatusId();
SetStatusAtIndex(index, newEffect.GetStatusId());
//Stance statuses need their time set to an extremely high number so their icon doesn't flash
//Adding getduration with them doesn't work because it overflows
uint time = (newEffect.GetFlags() & (uint) StatusEffectFlags.Stance) == 0 ? Utils.UnixTimeStampUTC(newEffect.GetEndTime()) : 0xFFFFFFFF;
SetTimeAtIndex(index, time);
//owner.charaWork.statusShownTime[index] = time;
//owner.zone.BroadcastPacketAroundActor(owner, SetActorStatusPacket.BuildPacket(owner.actorId, (ushort)index, newEffect.GetStatusId()));
//owner.zone.BroadcastPacketsAroundActor(owner, owner.GetActorStatusPackets());
}
owner.RecalculateStats();
}
@@ -233,13 +229,11 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
}
//hidden effects not in charawork
if(!effect.GetHidden())
var index = Array.IndexOf(owner.charaWork.status, effect.GetStatusId());
if (!effect.GetHidden() && index != -1)
{
var index = Array.IndexOf(owner.charaWork.status, effect.GetStatusId());
owner.charaWork.status[index] = 0;
owner.charaWork.statusShownTime[index] = 0;
this.owner.zone.BroadcastPacketAroundActor(this.owner, SetActorStatusPacket.BuildPacket(owner.actorId, (ushort)index, (ushort)0));
SetStatusAtIndex(index, 0);
SetTimeAtIndex(index, 0);
}
// function onLose(actor, effect)
effects.Remove(effect.GetStatusEffectId());
@@ -382,7 +376,6 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai
public void SetStatusAtIndex(int index, ushort statusId)
{
owner.charaWork.status[index] = statusId;
//owner.zone.BroadcastPacketAroundActor(owner, SetActorStatusPacket.BuildPacket(owner.actorId, (ushort)index, statusId));
statusSubpackets.Add(SetActorStatusPacket.BuildPacket(owner.actorId, (ushort)index, statusId));
owner.updateFlags |= ActorUpdateFlags.Status;

View File

@@ -50,6 +50,29 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.utils
{ HitType.Crit, HitEffect.Crit }
};
public static Dictionary<byte, ushort> ClassExperienceTextIds = new Dictionary<byte, ushort>()
{
{ 2, 33934 }, //Pugilist
{ 3, 33935 }, //Gladiator
{ 4, 33936 }, //Marauder
{ 7, 33937 }, //Archer
{ 8, 33938 }, //Lancer
{ 10, 33939 }, //Sentinel, this doesn't exist anymore but it's still in the files so may as well put it here just in case
{ 22, 33940 }, //Thaumaturge
{ 23, 33941 }, //Conjurer
{ 29, 33945 }, //Carpenter, for some reason there's a a few different messages between 33941 and 33945
{ 30, 33946 }, //Blacksmith
{ 31, 33947 }, //Armorer
{ 32, 33948 }, //Goldsmith
{ 33, 33949 }, //Leatherworker
{ 34, 33950 }, //Weaver
{ 35, 33951 }, //Alchemist
{ 36, 33952 }, //Culinarian
{ 39, 33953 }, //Miner
{ 40, 33954 }, //Botanist
{ 41, 33955 } //Fisher
};
//Most of these numbers I'm fairly certain are correct. The repeated numbers at levels 23 and 48 I'm less sure about but they do match some weird spots in the EXP graph
public static ushort[] BASEEXP = {150, 150, 150, 150, 150, 150, 150, 150, 150, 150, //Level <= 10
@@ -815,7 +838,7 @@ namespace FFXIVClassic_Map_Server.actors.chara.ai.utils
totalBonus += GetChainBonus(expChainNumber);
StatusEffect newChain = Server.GetWorldManager().GetStatusEffect((uint)StatusEffectId.EXPChain);
newChain.SetSilent(true);
newChain.SetDuration(timeLimit);
newChain.SetTier((byte)(Math.Min(expChainNumber + 1, 255)));
attacker.statusEffects.AddStatusEffect(newChain, attacker, true, true);