mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-20 19:57:46 +00:00
Fixed appearance bugs. Fixed a lua arg bug.
-Due to using ordinals instead of keys, the NPC voices were set wrong. This is fixed now, as all appearance loading from the DB uses keys now. -Fixed hairVariation not loading for lobby/map server. -Fixed a lua arg bug.
This commit is contained in:
parent
99c8aff702
commit
eecb5ac8a1
7 changed files with 93 additions and 58 deletions
|
@ -55,8 +55,11 @@ namespace Meteor.Lobby.DataObjects
|
|||
public uint hands = 0;
|
||||
public uint feet = 0;
|
||||
public uint waist = 0;
|
||||
public uint neck = 0;
|
||||
public uint rightEar = 0;
|
||||
public uint leftEar = 0;
|
||||
public uint rightIndex = 0;
|
||||
public uint leftIndex = 0;
|
||||
public uint rightFinger = 0;
|
||||
public uint leftFinger = 0;
|
||||
//Chara Info
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace Meteor.Lobby.DataObjects
|
|||
var bitfield = PrimitiveConversion.ToUInt32(faceInfo);
|
||||
|
||||
writer.Write((UInt32)bitfield); //FACE, Figure this out!
|
||||
uint hairVal = appearance.hairHighlightColor | (uint)(appearance.hairStyle << 10) | (uint)(appearance.characteristicsColor << 20);
|
||||
uint hairVal = appearance.hairHighlightColor | (uint)(appearance.hairVariation << 5) | (uint)(appearance.hairStyle << 10);
|
||||
writer.Write((UInt32)hairVal);
|
||||
writer.Write((UInt32)appearance.voice);
|
||||
writer.Write((UInt32)appearance.mainHand);
|
||||
|
@ -194,14 +194,11 @@ namespace Meteor.Lobby.DataObjects
|
|||
writer.Write((UInt32)appearance.feet);
|
||||
writer.Write((UInt32)appearance.waist);
|
||||
|
||||
writer.Write((UInt32)0);
|
||||
|
||||
writer.Write((UInt32)appearance.neck);
|
||||
writer.Write((UInt32)appearance.rightEar);
|
||||
writer.Write((UInt32)appearance.leftEar);
|
||||
|
||||
writer.Write((UInt32)0);
|
||||
writer.Write((UInt32)0);
|
||||
|
||||
writer.Write((UInt32)appearance.rightIndex);
|
||||
writer.Write((UInt32)appearance.leftIndex);
|
||||
writer.Write((UInt32)appearance.rightFinger);
|
||||
writer.Write((UInt32)appearance.leftFinger);
|
||||
|
||||
|
|
|
@ -623,6 +623,7 @@ namespace Meteor.Lobby
|
|||
hairStyle,
|
||||
hairColor,
|
||||
hairHighlightColor,
|
||||
hairVariation,
|
||||
eyeColor,
|
||||
characteristics,
|
||||
characteristicsColor,
|
||||
|
@ -642,6 +643,9 @@ namespace Meteor.Lobby
|
|||
hands,
|
||||
feet,
|
||||
waist,
|
||||
neck,
|
||||
leftIndex,
|
||||
rightIndex,
|
||||
leftFinger,
|
||||
rightFinger,
|
||||
leftEar,
|
||||
|
@ -660,6 +664,7 @@ namespace Meteor.Lobby
|
|||
appearance.hairStyle = reader.GetUInt16("hairStyle");
|
||||
appearance.hairColor = reader.GetUInt16("hairColor");
|
||||
appearance.hairHighlightColor = reader.GetUInt16("hairHighlightColor");
|
||||
appearance.hairVariation = reader.GetUInt16("hairVariation");
|
||||
appearance.eyeColor = reader.GetUInt16("eyeColor");
|
||||
appearance.characteristics = reader.GetByte("characteristics");
|
||||
appearance.characteristicsColor = reader.GetByte("characteristicsColor");
|
||||
|
@ -681,8 +686,11 @@ namespace Meteor.Lobby
|
|||
appearance.hands = reader.GetUInt32("hands");
|
||||
appearance.feet = reader.GetUInt32("feet");
|
||||
appearance.waist = reader.GetUInt32("waist");
|
||||
appearance.neck = reader.GetUInt32("neck");
|
||||
appearance.leftFinger = reader.GetUInt32("leftFinger");
|
||||
appearance.rightFinger = reader.GetUInt32("rightFinger");
|
||||
appearance.leftIndex = reader.GetUInt32("leftIndex");
|
||||
appearance.rightIndex = reader.GetUInt32("rightIndex");
|
||||
appearance.leftEar = reader.GetUInt32("leftEar");
|
||||
appearance.rightEar = reader.GetUInt32("rightEar");
|
||||
}
|
||||
|
|
|
@ -360,35 +360,45 @@ namespace Meteor.Map.Actors
|
|||
{
|
||||
while (reader.Read())
|
||||
{
|
||||
|
||||
//Handle Appearance
|
||||
modelId = reader.GetUInt32(0);
|
||||
appearanceIds[Character.SIZE] = reader.GetUInt32(1);
|
||||
appearanceIds[Character.COLORINFO] = (uint)(reader.GetUInt32(16) | (reader.GetUInt32(15) << 10) | (reader.GetUInt32(17) << 20)); //17 - Skin Color, 16 - Hair Color, 18 - Eye Color
|
||||
appearanceIds[Character.FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.GetFaceInfo(reader.GetByte(6), reader.GetByte(7), reader.GetByte(5), reader.GetByte(14), reader.GetByte(13), reader.GetByte(12), reader.GetByte(11), reader.GetByte(10), reader.GetByte(9), reader.GetByte(8)));
|
||||
appearanceIds[Character.HIGHLIGHT_HAIR] = (uint)(reader.GetUInt32(3) | reader.GetUInt32(2) << 10); //5- Hair Highlight, 4 - Hair Style
|
||||
appearanceIds[Character.VOICE] = reader.GetUInt32(17);
|
||||
appearanceIds[Character.MAINHAND] = reader.GetUInt32(19);
|
||||
appearanceIds[Character.OFFHAND] = reader.GetUInt32(20);
|
||||
appearanceIds[Character.SPMAINHAND] = reader.GetUInt32(21);
|
||||
appearanceIds[Character.SPOFFHAND] = reader.GetUInt32(22);
|
||||
appearanceIds[Character.THROWING] = reader.GetUInt32(23);
|
||||
appearanceIds[Character.PACK] = reader.GetUInt32(24);
|
||||
appearanceIds[Character.POUCH] = reader.GetUInt32(25);
|
||||
appearanceIds[Character.HEADGEAR] = reader.GetUInt32(26);
|
||||
appearanceIds[Character.BODYGEAR] = reader.GetUInt32(27);
|
||||
appearanceIds[Character.LEGSGEAR] = reader.GetUInt32(28);
|
||||
appearanceIds[Character.HANDSGEAR] = reader.GetUInt32(29);
|
||||
appearanceIds[Character.FEETGEAR] = reader.GetUInt32(30);
|
||||
appearanceIds[Character.WAISTGEAR] = reader.GetUInt32(31);
|
||||
appearanceIds[Character.NECKGEAR] = reader.GetUInt32(32);
|
||||
appearanceIds[Character.R_EAR] = reader.GetUInt32(33);
|
||||
appearanceIds[Character.L_EAR] = reader.GetUInt32(34);
|
||||
appearanceIds[Character.R_INDEXFINGER] = reader.GetUInt32(35);
|
||||
appearanceIds[Character.L_INDEXFINGER] = reader.GetUInt32(36);
|
||||
appearanceIds[Character.R_RINGFINGER] = reader.GetUInt32(37);
|
||||
appearanceIds[Character.L_RINGFINGER] = reader.GetUInt32(38);
|
||||
|
||||
modelId = reader.GetUInt32("base");
|
||||
appearanceIds[SIZE] = reader.GetUInt32("size");
|
||||
appearanceIds[COLORINFO] = (uint)(reader.GetUInt32("skinColor") | (reader.GetUInt32("hairColor") << 10) | (reader.GetUInt32("eyeColor") << 20));
|
||||
appearanceIds[FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.GetFaceInfo(
|
||||
reader.GetByte("characteristics"),
|
||||
reader.GetByte("characteristicsColor"),
|
||||
reader.GetByte("faceType"),
|
||||
reader.GetByte("ears"),
|
||||
reader.GetByte("faceMouth"),
|
||||
reader.GetByte("faceFeatures"),
|
||||
reader.GetByte("faceNose"),
|
||||
reader.GetByte("faceEyeShape"),
|
||||
reader.GetByte("faceIrisSize"),
|
||||
reader.GetByte("faceEyebrows")));
|
||||
appearanceIds[HIGHLIGHT_HAIR] = (uint)(reader.GetUInt32("hairHighlightColor") | reader.GetUInt32("hairVariation") << 5 | reader.GetUInt32("hairStyle") << 10);
|
||||
appearanceIds[VOICE] = reader.GetUInt32("voice");
|
||||
appearanceIds[MAINHAND] = reader.GetUInt32("mainHand");
|
||||
appearanceIds[OFFHAND] = reader.GetUInt32("offHand");
|
||||
appearanceIds[SPMAINHAND] = reader.GetUInt32("spMainHand");
|
||||
appearanceIds[SPOFFHAND] = reader.GetUInt32("spOffHand");
|
||||
appearanceIds[THROWING] = reader.GetUInt32("throwing");
|
||||
appearanceIds[PACK] = reader.GetUInt32("pack");
|
||||
appearanceIds[POUCH] = reader.GetUInt32("pouch");
|
||||
appearanceIds[MAINHAND] = reader.GetUInt32("mainHand");
|
||||
appearanceIds[OFFHAND] = reader.GetUInt32("offHand");
|
||||
appearanceIds[HEADGEAR] = reader.GetUInt32("head");
|
||||
appearanceIds[BODYGEAR] = reader.GetUInt32("body");
|
||||
appearanceIds[LEGSGEAR] = reader.GetUInt32("legs");
|
||||
appearanceIds[HANDSGEAR] = reader.GetUInt32("hands");
|
||||
appearanceIds[FEETGEAR] = reader.GetUInt32("feet");
|
||||
appearanceIds[WAISTGEAR] = reader.GetUInt32("waist");
|
||||
appearanceIds[NECKGEAR] = reader.GetUInt32("neck");
|
||||
appearanceIds[R_EAR] = reader.GetUInt32("rightEar");
|
||||
appearanceIds[L_EAR] = reader.GetUInt32("leftEar");
|
||||
appearanceIds[R_INDEXFINGER] = reader.GetUInt32("leftIndex");
|
||||
appearanceIds[L_INDEXFINGER] = reader.GetUInt32("rightIndex");
|
||||
appearanceIds[R_RINGFINGER] = reader.GetUInt32("rightFinger");
|
||||
appearanceIds[L_RINGFINGER] = reader.GetUInt32("leftFinger");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -189,6 +189,7 @@ namespace Meteor.Map
|
|||
hands = @hands,
|
||||
feet = @feet,
|
||||
waist = @waist,
|
||||
neck = @neck,
|
||||
leftFinger = @leftFinger,
|
||||
rightFinger = @rightFinger,
|
||||
leftEar = @leftEar,
|
||||
|
@ -206,6 +207,7 @@ namespace Meteor.Map
|
|||
cmd.Parameters.AddWithValue("@hands", player.appearanceIds[Character.HANDSGEAR]);
|
||||
cmd.Parameters.AddWithValue("@feet", player.appearanceIds[Character.FEETGEAR]);
|
||||
cmd.Parameters.AddWithValue("@waist", player.appearanceIds[Character.WAISTGEAR]);
|
||||
cmd.Parameters.AddWithValue("@neck", player.appearanceIds[Character.NECKGEAR]);
|
||||
cmd.Parameters.AddWithValue("@leftFinger", player.appearanceIds[Character.L_RINGFINGER]);
|
||||
cmd.Parameters.AddWithValue("@rightFinger", player.appearanceIds[Character.R_RINGFINGER]);
|
||||
cmd.Parameters.AddWithValue("@leftEar", player.appearanceIds[Character.L_EAR]);
|
||||
|
@ -873,6 +875,7 @@ namespace Meteor.Map
|
|||
hairStyle,
|
||||
hairColor,
|
||||
hairHighlightColor,
|
||||
hairVariation,
|
||||
eyeColor,
|
||||
characteristics,
|
||||
characteristicsColor,
|
||||
|
@ -892,6 +895,7 @@ namespace Meteor.Map
|
|||
hands,
|
||||
feet,
|
||||
waist,
|
||||
neck,
|
||||
leftFinger,
|
||||
rightFinger,
|
||||
leftEar,
|
||||
|
@ -904,27 +908,39 @@ namespace Meteor.Map
|
|||
{
|
||||
if (reader.Read())
|
||||
{
|
||||
if (reader.GetUInt32(0) == 0xFFFFFFFF)
|
||||
if (reader.GetUInt32("baseId") == 0xFFFFFFFF)
|
||||
player.modelId = CharacterUtils.GetTribeModel(player.playerWork.tribe);
|
||||
else
|
||||
player.modelId = reader.GetUInt32(0);
|
||||
player.appearanceIds[Character.SIZE] = reader.GetByte(1);
|
||||
player.appearanceIds[Character.COLORINFO] = (uint)(reader.GetUInt16(3) | (reader.GetUInt16(5) << 10) | (reader.GetUInt16(7) << 20));
|
||||
player.appearanceIds[Character.FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.GetFaceInfo(reader.GetByte(8), reader.GetByte(9), reader.GetByte(10), reader.GetByte(11), reader.GetByte(12), reader.GetByte(13), reader.GetByte(14), reader.GetByte(15), reader.GetByte(16), reader.GetByte(17)));
|
||||
player.appearanceIds[Character.HIGHLIGHT_HAIR] = (uint)(reader.GetUInt16(6) | reader.GetUInt16(4) << 10);
|
||||
player.appearanceIds[Character.VOICE] = reader.GetByte(2);
|
||||
player.appearanceIds[Character.MAINHAND] = reader.GetUInt32(18);
|
||||
player.appearanceIds[Character.OFFHAND] = reader.GetUInt32(19);
|
||||
player.appearanceIds[Character.HEADGEAR] = reader.GetUInt32(20);
|
||||
player.appearanceIds[Character.BODYGEAR] = reader.GetUInt32(21);
|
||||
player.appearanceIds[Character.LEGSGEAR] = reader.GetUInt32(22);
|
||||
player.appearanceIds[Character.HANDSGEAR] = reader.GetUInt32(23);
|
||||
player.appearanceIds[Character.FEETGEAR] = reader.GetUInt32(24);
|
||||
player.appearanceIds[Character.WAISTGEAR] = reader.GetUInt32(25);
|
||||
player.appearanceIds[Character.R_EAR] = reader.GetUInt32(26);
|
||||
player.appearanceIds[Character.L_EAR] = reader.GetUInt32(27);
|
||||
player.appearanceIds[Character.R_RINGFINGER] = reader.GetUInt32(28);
|
||||
player.appearanceIds[Character.L_RINGFINGER] = reader.GetUInt32(29);
|
||||
player.modelId = reader.GetUInt32("baseId");
|
||||
player.appearanceIds[Character.SIZE] = reader.GetByte("size");
|
||||
player.appearanceIds[Character.COLORINFO] = (uint)(reader.GetUInt16("skinColor") | (reader.GetUInt16("hairColor") << 10) | (reader.GetUInt16("eyeColor") << 20));
|
||||
player.appearanceIds[Character.FACEINFO] = PrimitiveConversion.ToUInt32(CharacterUtils.GetFaceInfo(
|
||||
reader.GetByte("characteristics"),
|
||||
reader.GetByte("characteristicsColor"),
|
||||
reader.GetByte("faceType"),
|
||||
reader.GetByte("ears"),
|
||||
reader.GetByte("faceMouth"),
|
||||
reader.GetByte("faceFeatures"),
|
||||
reader.GetByte("faceNose"),
|
||||
reader.GetByte("faceEyeShape"),
|
||||
reader.GetByte("faceIrisSize"),
|
||||
reader.GetByte("faceEyebrows")));
|
||||
player.appearanceIds[Character.HIGHLIGHT_HAIR] = (uint)(reader.GetUInt16("hairHighlightColor") | reader.GetUInt32("hairVariation") << 5 | reader.GetUInt32("hairStyle") << 10);
|
||||
player.appearanceIds[Character.VOICE] = reader.GetByte("voice");
|
||||
player.appearanceIds[Character.MAINHAND] = reader.GetUInt32("mainHand");
|
||||
player.appearanceIds[Character.OFFHAND] = reader.GetUInt32("offHand");
|
||||
player.appearanceIds[Character.HEADGEAR] = reader.GetUInt32("head");
|
||||
player.appearanceIds[Character.BODYGEAR] = reader.GetUInt32("body");
|
||||
player.appearanceIds[Character.LEGSGEAR] = reader.GetUInt32("legs");
|
||||
player.appearanceIds[Character.HANDSGEAR] = reader.GetUInt32("hands");
|
||||
player.appearanceIds[Character.FEETGEAR] = reader.GetUInt32("feet");
|
||||
player.appearanceIds[Character.WAISTGEAR] = reader.GetUInt32("waist");
|
||||
player.appearanceIds[Character.HEADGEAR] = reader.GetUInt32("head");
|
||||
player.appearanceIds[Character.NECKGEAR] = reader.GetUInt32("neck");
|
||||
player.appearanceIds[Character.R_EAR] = reader.GetUInt32("rightEar");
|
||||
player.appearanceIds[Character.L_EAR] = reader.GetUInt32("leftEar");
|
||||
player.appearanceIds[Character.R_RINGFINGER] = reader.GetUInt32("rightFinger");
|
||||
player.appearanceIds[Character.L_RINGFINGER] = reader.GetUInt32("leftFinger");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -600,7 +600,8 @@ namespace Meteor.Map.lua
|
|||
|
||||
public void EventStarted(Player player, Actor target, EventStartPacket eventStart)
|
||||
{
|
||||
List<LuaParam> lparams = eventStart.luaParams;
|
||||
List<LuaParam> lparams = new List<LuaParam>();
|
||||
lparams.AddRange(eventStart.luaParams);
|
||||
lparams.Insert(0, new LuaParam(2, eventStart.eventName));
|
||||
if (mSleepingOnPlayerEvent.ContainsKey(player.actorId))
|
||||
{
|
||||
|
|
|
@ -229,7 +229,7 @@
|
|||
<Compile Include="Packets\Send\Actor\Battle\CommandResultX18Packet.cs" />
|
||||
<Compile Include="Packets\Send\Actor\Battle\CommandResultX10Packet.cs" />
|
||||
<Compile Include="Packets\Send\Actor\DeleteAllActorsPacket.cs" />
|
||||
<Compile Include="Packets\Send\Actor\Events\SetEventStatus.cs" />
|
||||
<Compile Include="Packets\Send\Actor\Events\SetEventStatusPacket.cs" />
|
||||
<Compile Include="Packets\Send\Actor\Events\SetNoticeEventCondition.cs" />
|
||||
<Compile Include="Packets\Send\Actor\Events\SetPushEventConditionWithTriggerBox.cs" />
|
||||
<Compile Include="Packets\Send\Actor\Events\SetPushEventConditionWithFan.cs" />
|
||||
|
|
Loading…
Add table
Reference in a new issue