mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-21 20:27:47 +00:00
Fixed bug with dialog treating all characters as men.
This commit is contained in:
parent
958a87edf2
commit
c38caffaf1
3 changed files with 31 additions and 1 deletions
|
@ -341,6 +341,24 @@ namespace Meteor.Map.Actors
|
|||
return subpackets;
|
||||
}
|
||||
|
||||
public new SubPacket CreateNamePacket()
|
||||
{
|
||||
bool isMale = true;
|
||||
switch (playerWork.tribe)
|
||||
{
|
||||
case 2:
|
||||
case 5:
|
||||
case 7:
|
||||
case 9:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
isMale = false;
|
||||
break;
|
||||
}
|
||||
return SetActorNamePacket.BuildPacket(actorId, customDisplayName != null ? 0 : displayNameId, displayNameId == 0xFFFFFFFF | displayNameId == 0x0 | customDisplayName != null ? customDisplayName : "", isMale);
|
||||
}
|
||||
|
||||
public List<SubPacket> CreatePlayerRelatedPackets(uint requestingPlayerActorId)
|
||||
{
|
||||
List<SubPacket> subpackets = new List<SubPacket>();
|
||||
|
@ -778,6 +796,13 @@ namespace Meteor.Map.Actors
|
|||
Database.SavePlayerPlayTime(this);
|
||||
Database.SavePlayerPosition(this);
|
||||
Database.SavePlayerStatusEffects(this);
|
||||
|
||||
//Save Quests
|
||||
foreach (Quest quest in questScenario)
|
||||
{
|
||||
if (quest != null)
|
||||
quest.SaveData();
|
||||
}
|
||||
}
|
||||
|
||||
public void CleanupAndSave(uint destinationZone, ushort spawnType, float destinationX, float destinationY, float destinationZ, float destinationRot)
|
||||
|
|
|
@ -69,6 +69,8 @@ namespace Meteor.Map.lua
|
|||
UserData.RegisterType<Command>();
|
||||
UserData.RegisterType<Npc>();
|
||||
UserData.RegisterType<Quest>();
|
||||
UserData.RegisterType<Zone>();
|
||||
UserData.RegisterType<Director>();
|
||||
UserData.RegisterType<WorldManager>();
|
||||
UserData.RegisterType<WorldMaster>();
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace Meteor.Map.packets.send.actor
|
|||
public const ushort OPCODE = 0x013D;
|
||||
public const uint PACKET_SIZE = 0x48;
|
||||
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint displayNameID, string customName)
|
||||
public static SubPacket BuildPacket(uint sourceActorId, uint displayNameID, string customName, bool isSexMale = true)
|
||||
{
|
||||
byte[] data = new byte[PACKET_SIZE - 0x20];
|
||||
|
||||
|
@ -45,6 +45,9 @@ namespace Meteor.Map.packets.send.actor
|
|||
if (customName != null && (displayNameID == 0 || displayNameID == 0xFFFFFFFF))
|
||||
{
|
||||
binWriter.Write(Encoding.ASCII.GetBytes(customName), 0, Encoding.ASCII.GetByteCount(customName) >= 0x20 ? 0x19 : Encoding.ASCII.GetByteCount(customName));
|
||||
|
||||
binWriter.BaseStream.Seek(0x24, SeekOrigin.Begin);
|
||||
binWriter.Write((UInt32)(isSexMale ? 0 : 1));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue