mirror of
https://bitbucket.org/Ioncannon/project-meteor-server.git
synced 2025-04-23 21:27:46 +00:00
Removed the state and custom name columns from the enpc table. Renamed server_spawn_locations to server_eventnpc_spawn_locations. Renamed animationId to motionPack.
This commit is contained in:
parent
cfe6ef2e5e
commit
9097e557ed
6 changed files with 1101 additions and 1090 deletions
File diff suppressed because it is too large
Load diff
|
@ -517,7 +517,7 @@ namespace Meteor.Map.Actors
|
|||
if (actorClass == null)
|
||||
return;
|
||||
|
||||
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, this, location.x, location.y, location.z, location.rot, location.state, location.animId, null);
|
||||
Npc npc = new Npc(mActorList.Count + 1, actorClass, location.uniqueId, this, location.x, location.y, location.z, location.rot, 0, location.motionPack, null);
|
||||
|
||||
npc.LoadEventConditions(actorClass.eventConditions);
|
||||
|
||||
|
|
|
@ -32,10 +32,9 @@ namespace Meteor.Map.actors.area
|
|||
public float y;
|
||||
public float z;
|
||||
public float rot;
|
||||
public ushort state;
|
||||
public uint animId;
|
||||
public uint motionPack;
|
||||
|
||||
public SpawnLocation(uint classId, string uniqueId, uint zoneId, string privAreaName, int privAreaLevel, float x, float y, float z, float rot, ushort state, uint animId)
|
||||
public SpawnLocation(uint classId, string uniqueId, uint zoneId, string privAreaName, int privAreaLevel, float x, float y, float z, float rot, uint animId)
|
||||
{
|
||||
this.classId = classId;
|
||||
this.uniqueId = uniqueId;
|
||||
|
@ -46,8 +45,7 @@ namespace Meteor.Map.actors.area
|
|||
this.y = y;
|
||||
this.z = z;
|
||||
this.rot = rot;
|
||||
this.state = state;
|
||||
this.animId = animId;
|
||||
this.motionPack = animId;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,6 +14,21 @@
|
|||
<FileAlignment>512</FileAlignment>
|
||||
<NuGetPackageImportStamp>1d22ec4a</NuGetPackageImportStamp>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
|
@ -417,7 +432,13 @@
|
|||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Common Class Lib\Common Class Lib.csproj">
|
||||
<Project>{3a3d6626-c820-4c18-8c81-64811424f20e}</Project>
|
||||
|
@ -430,8 +451,8 @@
|
|||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
<PreBuildEvent>if exist "$(TargetPath).locked" del "$(TargetPath).locked"
|
||||
if exist "$(TargetPath)" if not exist "$(TargetPath).locked" move "$(TargetPath)" "$(TargetPath).locked"</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace Meteor.Map
|
|||
mWorldManager.LoadZoneList();
|
||||
mWorldManager.LoadSeamlessBoundryList();
|
||||
mWorldManager.LoadActorClasses();
|
||||
mWorldManager.LoadSpawnLocations();
|
||||
mWorldManager.LoadENPCs();
|
||||
mWorldManager.LoadBattleNpcs();
|
||||
mWorldManager.LoadStatusEffects();
|
||||
mWorldManager.LoadBattleCommands();
|
||||
|
|
|
@ -315,7 +315,7 @@ namespace Meteor.Map
|
|||
Program.Log.Info(String.Format("Loaded {0} actor classes.", count));
|
||||
}
|
||||
|
||||
public void LoadSpawnLocations()
|
||||
public void LoadENPCs()
|
||||
{
|
||||
int count = 0;
|
||||
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)))
|
||||
|
@ -335,10 +335,8 @@ namespace Meteor.Map
|
|||
positionY,
|
||||
positionZ,
|
||||
rotation,
|
||||
actorState,
|
||||
animationId,
|
||||
customDisplayName
|
||||
FROM server_spawn_locations
|
||||
motionPack
|
||||
FROM server_eventnpc_spawn_locations
|
||||
";
|
||||
|
||||
MySqlCommand cmd = new MySqlCommand(query, conn);
|
||||
|
@ -357,9 +355,6 @@ namespace Meteor.Map
|
|||
if (zone == null)
|
||||
continue;
|
||||
|
||||
string customName = null;
|
||||
if (!reader.IsDBNull(11))
|
||||
customName = reader.GetString("customDisplayName");
|
||||
string uniqueId = reader.GetString("uniqueId");
|
||||
string privAreaName = reader.GetString("privateAreaName");
|
||||
int privAreaType = reader.GetInt32("privateAreaLevel");
|
||||
|
@ -367,10 +362,9 @@ namespace Meteor.Map
|
|||
float y = reader.GetFloat("positionY");
|
||||
float z = reader.GetFloat("positionZ");
|
||||
float rot = reader.GetFloat("rotation");
|
||||
ushort state = reader.GetUInt16("actorState");
|
||||
uint animId = reader.GetUInt32("animationId");
|
||||
uint motionPack = reader.GetUInt32("motionPack");
|
||||
|
||||
SpawnLocation spawn = new SpawnLocation(classId, uniqueId, zoneId, privAreaName, privAreaType, x, y, z, rot, state, animId);
|
||||
SpawnLocation spawn = new SpawnLocation(classId, uniqueId, zoneId, privAreaName, privAreaType, x, y, z, rot, motionPack);
|
||||
|
||||
zone.AddSpawnLocation(spawn);
|
||||
|
||||
|
@ -387,7 +381,7 @@ namespace Meteor.Map
|
|||
}
|
||||
}
|
||||
|
||||
Program.Log.Info(String.Format("Loaded {0} spawn(s).", count));
|
||||
Program.Log.Info(String.Format("Loaded {0} ENPC(s).", count));
|
||||
}
|
||||
|
||||
public void LoadBattleNpcs()
|
||||
|
@ -492,7 +486,7 @@ namespace Meteor.Map
|
|||
}
|
||||
}
|
||||
}
|
||||
Program.Log.Info("Loaded {0} monsters.", count);
|
||||
Program.Log.Info("Loaded {0} BNPC(s).", count);
|
||||
}
|
||||
catch (MySqlException e)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue