mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-06-08 13:34:38 +02:00
fixed auto attack (<3 showmo)
This commit is contained in:
parent
56491266cc
commit
bab81a809c
6 changed files with 19 additions and 18 deletions
|
@ -546,8 +546,9 @@ namespace FFXIVClassic_Map_Server
|
|||
z.SpawnAllActors(true);
|
||||
}
|
||||
|
||||
public void SpawnBattleNpcById(uint id, Area area = null)
|
||||
public BattleNpc SpawnBattleNpcById(uint id, Area area = null)
|
||||
{
|
||||
BattleNpc bnpc = null;
|
||||
// todo: this is stupid duplicate code and really needs to die, think of a better way later
|
||||
using (MySqlConnection conn = new MySqlConnection(String.Format("Server={0}; Port={1}; Database={2}; UID={3}; Password={4}", ConfigConstants.DATABASE_HOST, ConfigConstants.DATABASE_PORT, ConfigConstants.DATABASE_NAME, ConfigConstants.DATABASE_USERNAME, ConfigConstants.DATABASE_PASSWORD)))
|
||||
{
|
||||
|
@ -581,7 +582,7 @@ namespace FFXIVClassic_Map_Server
|
|||
{
|
||||
area = area ?? Server.GetWorldManager().GetZone(reader.GetUInt16("zoneId"));
|
||||
int actorId = area.GetActorCount() + 1;
|
||||
var bnpc = area.GetBattleNpcById(id);
|
||||
bnpc = area.GetBattleNpcById(id);
|
||||
|
||||
if (bnpc != null)
|
||||
{
|
||||
|
@ -643,7 +644,7 @@ namespace FFXIVClassic_Map_Server
|
|||
battleNpc.CalculateBaseStats();
|
||||
battleNpc.RecalculateStats();
|
||||
//battleNpc.SetMod((uint)Modifier.ResistFire, )
|
||||
|
||||
bnpc = battleNpc;
|
||||
area.AddActorToZone(battleNpc);
|
||||
count++;
|
||||
}
|
||||
|
@ -659,6 +660,7 @@ namespace FFXIVClassic_Map_Server
|
|||
conn.Dispose();
|
||||
}
|
||||
}
|
||||
return bnpc;
|
||||
}
|
||||
|
||||
public void LoadBattleNpcModifiers(string tableName, string primaryKey, Dictionary<uint, ModifierList> list)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue