public static void SendUpdateAnimationToAll(int AnimationNum) { ByteStream buffer = new ByteStream(4); buffer.WriteInt32((int)Packets.ServerPackets.SUpdateAnimation); buffer.WriteBlock(AnimationData(AnimationNum)); // buffer.WriteInt32(AnimationNum) // For i = 0 To UBound(Animation(AnimationNum).Frames) // buffer.WriteInt32(Animation(AnimationNum).Frames(i)) // Next // For i = 0 To UBound(Animation(AnimationNum).LoopCount) // buffer.WriteInt32(Animation(AnimationNum).LoopCount(i)) // Next // For i = 0 To UBound(Animation(AnimationNum).LoopTime) // buffer.WriteInt32(Animation(AnimationNum).LoopTime(i)) // Next // buffer.WriteString((Animation(AnimationNum).Name)) // buffer.WriteString((Animation(AnimationNum).Sound)) // For i = 0 To UBound(Animation(AnimationNum).Sprite) // buffer.WriteInt32(Animation(AnimationNum).Sprite(i)) // Next S_General.AddDebug("Sent SMSG: SUpdateAnimation To All"); S_NetworkConfig.SendDataToAll(ref buffer.Data, buffer.Head); buffer.Dispose(); }
public static void SendUpdateRecipeToAll(int RecipeNum) { ByteStream buffer; buffer = new ByteStream(4); buffer.WriteInt32((int)Packets.ServerPackets.SUpdateRecipe); buffer.WriteInt32(RecipeNum); S_General.AddDebug("Sent SMSG: SUpdateRecipe To All"); buffer.WriteString((Microsoft.VisualBasic.Strings.Trim(Recipe[RecipeNum].Name))); buffer.WriteInt32(Recipe[RecipeNum].RecipeType); buffer.WriteInt32(Recipe[RecipeNum].MakeItemNum); buffer.WriteInt32(Recipe[RecipeNum].MakeItemAmount); for (var i = 1; i <= Constants.MAX_INGREDIENT; i++) { buffer.WriteInt32(Recipe[RecipeNum].Ingredients[i].ItemNum); buffer.WriteInt32(Recipe[RecipeNum].Ingredients[i].Value); } buffer.WriteInt32(Recipe[RecipeNum].CreateTime); S_NetworkConfig.SendDataToAll(ref buffer.Data, buffer.Head); buffer.Dispose(); }
public static void SendUpdateResourceToAll(int ResourceNum) { ByteStream buffer = new ByteStream(4); buffer.WriteInt32((int)Packets.ServerPackets.SUpdateResource); buffer.WriteBlock(ResourceData(ResourceNum)); S_General.AddDebug("Sent SMSG: SUpdateResource"); S_NetworkConfig.SendDataToAll(ref buffer.Data, buffer.Head); buffer.Dispose(); }
public static void SendUpdateItemToAll(int itemNum) { ByteStream buffer; buffer = new ByteStream(4); buffer.WriteInt32((byte)Packets.ServerPackets.SUpdateItem); buffer.WriteBlock(ItemData(itemNum)); S_General.AddDebug("Sent SMSG: SUpdateItem To All"); S_NetworkConfig.SendDataToAll(ref buffer.Data, buffer.Head); buffer.Dispose(); }
public static void SendUpdateProjectileToAll(int ProjectileNum) { ByteStream buffer; buffer = new ByteStream(4); buffer.WriteInt32((byte)Packets.ServerPackets.SUpdateProjectile); buffer.WriteInt32(ProjectileNum); buffer.WriteString((Microsoft.VisualBasic.Strings.Trim(Projectiles[ProjectileNum].Name))); buffer.WriteInt32(Projectiles[ProjectileNum].Sprite); buffer.WriteInt32(Projectiles[ProjectileNum].Range); buffer.WriteInt32(Projectiles[ProjectileNum].Speed); buffer.WriteInt32(Projectiles[ProjectileNum].Damage); S_NetworkConfig.SendDataToAll(ref buffer.Data, buffer.Head); buffer.Dispose(); }
public static void SendUpdateQuestToAll(int QuestNum) { ByteStream buffer; buffer = new ByteStream(4); buffer.WriteInt32((byte)Packets.ServerPackets.SUpdateQuest); buffer.WriteInt32(QuestNum); buffer.WriteString((Microsoft.VisualBasic.Strings.Trim(Quest[QuestNum].Name))); buffer.WriteString((Microsoft.VisualBasic.Strings.Trim(Quest[QuestNum].QuestLog))); buffer.WriteInt32(Quest[QuestNum].Repeat); buffer.WriteInt32(Quest[QuestNum].Cancelable); buffer.WriteInt32(Quest[QuestNum].ReqCount); var loopTo = Quest[QuestNum].ReqCount; for (var I = 1; I <= loopTo; I++) { buffer.WriteInt32(Quest[QuestNum].Requirement[I]); buffer.WriteInt32(Quest[QuestNum].RequirementIndex[I]); } buffer.WriteInt32(Quest[QuestNum].QuestGiveItem); buffer.WriteInt32(Quest[QuestNum].QuestGiveItemValue); buffer.WriteInt32(Quest[QuestNum].QuestRemoveItem); buffer.WriteInt32(Quest[QuestNum].QuestRemoveItemValue); for (var I = 1; I <= 3; I++) { buffer.WriteString((Microsoft.VisualBasic.Strings.Trim(Quest[QuestNum].Chat[I]))); } buffer.WriteInt32(Quest[QuestNum].RewardCount); var loopTo1 = Quest[QuestNum].RewardCount; for (var i = 1; i <= loopTo1; i++) { buffer.WriteInt32(Quest[QuestNum].RewardItem[i]); buffer.WriteInt32(Quest[QuestNum].RewardItemAmount[i]); } buffer.WriteInt32(Quest[QuestNum].RewardExp); buffer.WriteInt32(Quest[QuestNum].TaskCount); var loopTo2 = Quest[QuestNum].TaskCount; for (var I = 1; I <= loopTo2; I++) { buffer.WriteInt32(Quest[QuestNum].Task[I].Order); buffer.WriteInt32(Quest[QuestNum].Task[I].NPC); buffer.WriteInt32(Quest[QuestNum].Task[I].Item); buffer.WriteInt32(Quest[QuestNum].Task[I].Map); buffer.WriteInt32(Quest[QuestNum].Task[I].Resource); buffer.WriteInt32(Quest[QuestNum].Task[I].Amount); buffer.WriteString((Microsoft.VisualBasic.Strings.Trim(Quest[QuestNum].Task[I].Speech))); buffer.WriteString((Microsoft.VisualBasic.Strings.Trim(Quest[QuestNum].Task[I].TaskLog))); buffer.WriteInt32(Quest[QuestNum].Task[I].QuestEnd); buffer.WriteInt32(Quest[QuestNum].Task[I].TaskType); } S_NetworkConfig.SendDataToAll(ref buffer.Data, buffer.Head); buffer.Dispose(); }