[6889] Backport some not client version specific changes and fixes from 303 branch.

This commit is contained in:
VladimirMangos 2008-12-09 14:05:23 +03:00
parent 480a935216
commit 3da9f3f4cc
56 changed files with 1998 additions and 377 deletions

View file

@ -17,3 +17,4 @@
debug
release
*.user
*.ilk

View file

@ -39,7 +39,7 @@ enum Extract
};
int extract = EXTRACT_MAP | EXTRACT_DBC;
static char* const langs[]={"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
static char* const langs[] = {"enGB", "enUS", "deDE", "esES", "frFR", "koKR", "zhCN", "zhTW", "enCN", "enTW", "esMX", "ruRU" };
#define LANG_COUNT 12
#define ADT_RES 64
@ -55,9 +55,9 @@ void CreateDir( const std::string& Path )
bool FileExists( const char* FileName )
{
if( FILE* fp = fopen( FileName, "rb" ) )
if(FILE* fp = fopen( FileName, "rb" ))
{
fclose( fp );
fclose(fp);
return true;
}
@ -222,15 +222,15 @@ void ExtractDBCFiles(int locale, bool basicLocale)
string filename = path;
filename += (iter->c_str() + strlen("DBFilesClient\\"));
FILE *output=fopen(filename.c_str(),"wb");
FILE *output=fopen(filename.c_str(), "wb");
if(!output)
{
printf("Can't create the output file '%s'\n",filename.c_str());
printf("Can't create the output file '%s'\n", filename.c_str());
continue;
}
MPQFile m(iter->c_str());
if(!m.isEof())
fwrite(m.getPointer(),1,m.getSize(),output);
fwrite(m.getPointer(), 1, m.getSize(), output);
fclose(output);
++count;
@ -242,7 +242,7 @@ void LoadLocaleMPQFiles(int const locale)
{
char filename[512];
sprintf(filename,"%s/Data/%s/locale-%s.MPQ",input_path,langs[locale],langs[locale]);
sprintf(filename,"%s/Data/%s/locale-%s.MPQ", input_path, langs[locale], langs[locale]);
new MPQArchive(filename);
for(int i = 1; i < 5; ++i)
@ -251,7 +251,7 @@ void LoadLocaleMPQFiles(int const locale)
if(i > 1)
sprintf(ext, "-%i", i);
sprintf(filename,"%s/Data/%s/patch-%s%s.MPQ",input_path,langs[locale],langs[locale],ext);
sprintf(filename,"%s/Data/%s/patch-%s%s.MPQ", input_path, langs[locale], langs[locale], ext);
if(FileExists(filename))
new MPQArchive(filename);
}
@ -261,9 +261,9 @@ void LoadCommonMPQFiles()
{
char filename[512];
sprintf(filename,"%s/Data/common.MPQ",input_path);
sprintf(filename,"%s/Data/common-2.MPQ", input_path);
new MPQArchive(filename);
sprintf(filename,"%s/Data/expansion.MPQ",input_path);
sprintf(filename,"%s/Data/expansion.MPQ", input_path);
new MPQArchive(filename);
for(int i = 1; i < 5; ++i)
@ -272,7 +272,7 @@ void LoadCommonMPQFiles()
if(i > 1)
sprintf(ext, "-%i", i);
sprintf(filename,"%s/Data/patch%s.MPQ",input_path,ext);
sprintf(filename,"%s/Data/patch%s.MPQ", input_path, ext);
if(FileExists(filename))
new MPQArchive(filename);
}
@ -306,12 +306,12 @@ int main(int argc, char * arg[])
if((extract & EXTRACT_DBC) == 0)
{
FirstLocale=i;
FirstLocale = i;
break;
}
//Extract DBC files
if(FirstLocale<0)
if(FirstLocale < 0)
{
ExtractDBCFiles(i, true);
FirstLocale = i;
@ -324,7 +324,7 @@ int main(int argc, char * arg[])
}
}
if(FirstLocale<0)
if(FirstLocale < 0)
{
printf("No locales detected\n");
return 0;

View file

@ -76,7 +76,7 @@
Name="VCLinkerTool"
AdditionalDependencies="zlib.lib"
OutputFile="ad debug.exe"
LinkIncremental="1"
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="./debug/"
IgnoreDefaultLibraryNames="LIBCD.lib"
@ -171,7 +171,7 @@
Name="VCLinkerTool"
AdditionalDependencies="zlib.lib"
OutputFile="./ad.exe"
LinkIncremental="1"
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="./release/"
IgnoreDefaultLibraryNames="LIBC.lib"

View file

@ -79,7 +79,7 @@
Name="VCLinkerTool"
AdditionalDependencies="zlib.lib"
OutputFile="ad debug.exe"
LinkIncremental="1"
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="./debug"
IgnoreDefaultLibraryNames="LIBCD.lib"
@ -176,7 +176,7 @@
Name="VCLinkerTool"
AdditionalDependencies="zlib.lib"
OutputFile="./ad.exe"
LinkIncremental="1"
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="./release"
IgnoreDefaultLibraryNames="LIBC.lib"

View file

@ -80,7 +80,7 @@
Name="VCLinkerTool"
AdditionalDependencies="zlib.lib"
OutputFile="ad debug.exe"
LinkIncremental="1"
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="./debug/"
IgnoreDefaultLibraryNames="LIBCD.lib"
@ -175,7 +175,7 @@
Name="VCLinkerTool"
AdditionalDependencies="zlib.lib"
OutputFile="./ad.exe"
LinkIncremental="1"
LinkIncremental="0"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="./release/"
IgnoreDefaultLibraryNames="LIBC.lib"

16
contrib/vmap_assembler/.gitignore vendored Normal file
View file

@ -0,0 +1,16 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.ncb
*.suo
Release
Debug

13
contrib/vmap_assembler/VC71/.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.user

13
contrib/vmap_assembler/VC80/.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.user

13
contrib/vmap_assembler/VC90/.gitignore vendored Normal file
View file

@ -0,0 +1,13 @@
#
# NOTE! Don't add files that are generated in specific
# subdirectories here. Add them in the ".gitignore" file
# in that subdirectory instead.
#
# NOTE! Please use 'git-ls-files -i --exclude-standard'
# command after changing this file, to see if there are
# any tracked files which get ignored after the change.
#
# MaNGOS generated files at Windows build
#
*.user

View file

@ -0,0 +1,455 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="vmap_assembler"
ProjectGUID="{572FFF74-480C-4472-8ABF-81733BB4049D}"
Keyword="Win32Proj"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="..\Debug"
IntermediateDirectory="..\Debug\obj"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\..\..\dep\include\g3dlite;..\..\..\src\shared\vmap;"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/vmap_assembler.exe"
LinkIncremental="2"
GenerateDebugInformation="true"
ProgramDatabaseFile="$(OutDir)/vmap_assembler.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="..\Release"
IntermediateDirectory="..\Release\obj"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\..\dep\include\g3dlite;..\..\..\src\shared\vmap;"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="0"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/vmap_assembler.exe"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\..\vmap_assembler.cpp"
>
</File>
</Filter>
<Filter
Name="vmaplib"
>
<File
RelativePath="..\..\..\src\shared\vmap\AABSPTree.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\BaseModel.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\BaseModel.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\CoordModelMapping.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\CoordModelMapping.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\DebugCmdLogger.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\DebugCmdLogger.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\ManagedModelContainer.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\ManagedModelContainer.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\ModelContainer.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\ModelContainer.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\NodeValueAccess.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\ShortBox.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\ShortVector.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\SubModel.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\SubModel.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\TileAssembler.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\TileAssembler.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\TreeNode.cpp"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\TreeNode.h"
>
</File>
<File
RelativePath="..\..\..\src\shared\vmap\VMapTools.h"
>
</File>
</Filter>
<Filter
Name="g3dlite"
>
<File
RelativePath="..\..\..\dep\src\g3dlite\AABox.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\AABox.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\AABSPTree.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Array.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\Box.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Box.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\CollisionDetection.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\CoordinateFrame.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\Crypto.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Crypto.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\debug.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\format.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\format.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\g3dmath.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\g3dmath.inl"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\GCamera.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Line.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\Matrix3.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Matrix3.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\Plane.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Plane.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\platform.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Quat.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Quat.inl"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Ray.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\RegistryUtil.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Sphere.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\stringutils.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\System.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\System.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Table.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\Triangle.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Triangle.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector2.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector2.inl"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector2int16.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\Vector3.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector3.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector3.inl"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector3int16.h"
>
</File>
<File
RelativePath="..\..\..\dep\src\g3dlite\Vector4.cpp"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector4.h"
>
</File>
<File
RelativePath="..\..\..\dep\include\g3dlite\G3D\Vector4.inl"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmap_assembler", "VC90\vmap_assembler.vcproj", "{572FFF74-480C-4472-8ABF-81733BB4049D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.ActiveCfg = Debug|Win32
{572FFF74-480C-4472-8ABF-81733BB4049D}.Debug|Win32.Build.0 = Debug|Win32
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.ActiveCfg = Release|Win32
{572FFF74-480C-4472-8ABF-81733BB4049D}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,19 @@
Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vmapExtractor", "vmapExtractor_VC90.vcproj", "{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug Ansi Static|Win32 = Debug Ansi Static|Win32
Release Ansi Static|Win32 = Release Ansi Static|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Debug Ansi Static|Win32.ActiveCfg = Debug Ansi Static|Win32
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Debug Ansi Static|Win32.Build.0 = Debug Ansi Static|Win32
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Release Ansi Static|Win32.ActiveCfg = Release Ansi Static|Win32
{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}.Release Ansi Static|Win32.Build.0 = Release Ansi Static|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View file

@ -0,0 +1,999 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="vmapExtractor"
ProjectGUID="{87335BBF-5DA8-4FEC-A51E-1FB948F2FFE9}"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug Ansi Static|Win32"
OutputDirectory=".\bin\Win32\DebugAS"
IntermediateDirectory=".\bin\Win32\DebugAS"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\bin\StormLibTest\Win32\DebugAS/StormLibTest.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/wd 4996"
Optimization="0"
AdditionalIncludeDirectories=".\stormlib"
PreprocessorDefinitions="_DEBUG;_CONSOLE;WIN32"
BasicRuntimeChecks="3"
RuntimeLibrary="1"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=""
AssemblerListingLocation=".\bin\Win32\DebugAS/"
ObjectFile=".\bin\Win32\DebugAS/"
ProgramDataBaseFileName=".\bin\Win32\DebugAS/"
BrowseInformation="1"
WarningLevel="4"
SuppressStartupBanner="true"
DebugInformationFormat="4"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1029"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\bin\Win32\DebugAS\vmapextract_v2.exe"
LinkIncremental="2"
SuppressStartupBanner="true"
GenerateDebugInformation="true"
ProgramDatabaseFile=".\bin\Win32\DebugAS/StormLib.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release Ansi Static|Win32"
OutputDirectory=".\bin\Win32\ReleaseAS"
IntermediateDirectory=".\bin\Win32\ReleaseAS"
ConfigurationType="1"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TypeLibraryName=".\bin\StormLibTest\Win32\ReleaseAS/StormLibTest.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/wd 4996"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories=".\stormlib"
PreprocessorDefinitions="NDEBUG;_CONSOLE;WIN32"
StringPooling="true"
RuntimeLibrary="0"
EnableFunctionLevelLinking="true"
EnableEnhancedInstructionSet="1"
UsePrecompiledHeader="0"
PrecompiledHeaderFile=""
AssemblerListingLocation=".\bin\Win32\ReleaseAS/"
ObjectFile=".\bin\Win32\ReleaseAS/"
ProgramDataBaseFileName=".\bin\Win32\ReleaseAS/"
WarningLevel="4"
SuppressStartupBanner="true"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1029"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile=".\bin\Win32\ReleaseAS\vmapextract_v2.exe"
LinkIncremental="1"
SuppressStartupBanner="true"
ProgramDatabaseFile=".\bin\Win32\ReleaseAS/StormLib.pdb"
SubSystem="1"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<Filter
Name="pklib"
>
<File
RelativePath="stormlib\pklib\crc32.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\pklib\explode.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\pklib\implode.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\pklib\pklib.h"
>
</File>
</Filter>
<Filter
Name="zlib"
>
<Filter
Name="Zlib Headers"
>
<File
RelativePath="stormlib\zlib\zconf.h"
>
</File>
<File
RelativePath="stormlib\zlib\zlib.h"
>
</File>
</Filter>
<Filter
Name="Zlib Sources"
>
<File
RelativePath="stormlib\zlib\adler32.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\deflate.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\infblock.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\infcodes.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\inffast.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\inflate.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\inftrees.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\infutil.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\trees.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\zlib\zmemory.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
</Filter>
</Filter>
<Filter
Name="huffman"
>
<File
RelativePath="stormlib\huffman\huff.cpp"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\huffman\huff.h"
>
</File>
</Filter>
<Filter
Name="wave"
>
<File
RelativePath="stormlib\wave\wave.cpp"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\wave\wave.h"
>
</File>
</Filter>
<Filter
Name="bzip2"
Filter="*.h;*.c"
>
<File
RelativePath="stormlib\bzip2\blocksort.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\bzip2\bzlib.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\bzip2\compress.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\bzip2\crctable.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\bzip2\decompress.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\bzip2\huffman.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
<File
RelativePath="stormlib\bzip2\randtable.c"
>
<FileConfiguration
Name="Debug Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
BasicRuntimeChecks="3"
BrowseInformation="1"
WarningLevel="3"
/>
</FileConfiguration>
<FileConfiguration
Name="Release Ansi Static|Win32"
>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
AdditionalIncludeDirectories=""
PreprocessorDefinitions=""
WarningLevel="3"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="vmap"
>
<File
RelativePath=".\vmapextract\adtfile.cpp"
>
</File>
<File
RelativePath=".\vmapextract\adtfile.h"
>
</File>
<File
RelativePath=".\vmapextract\dbcfile.cpp"
>
</File>
<File
RelativePath=".\vmapextract\dbcfile.h"
>
</File>
<File
RelativePath=".\vmapextract\model.cpp"
>
</File>
<File
RelativePath=".\vmapextract\model.h"
>
</File>
<File
RelativePath=".\vmapextract\modelheaders.h"
>
</File>
<File
RelativePath=".\vmapextract\mpq.cpp"
>
</File>
<File
RelativePath=".\vmapextract\mpq.h"
>
</File>
<File
RelativePath=".\vmapextract\vec3d.h"
>
</File>
<File
RelativePath=".\vmapextract\vmapexport.cpp"
>
</File>
<File
RelativePath=".\vmapextract\wdtfile.cpp"
>
</File>
<File
RelativePath=".\vmapextract\wdtfile.h"
>
</File>
<File
RelativePath=".\vmapextract\wmo.cpp"
>
</File>
<File
RelativePath=".\vmapextract\wmo.h"
>
</File>
</Filter>
<Filter
Name="stormlib"
>
<File
RelativePath=".\stormlib\SCommon.cpp"
>
</File>
<File
RelativePath=".\stormlib\SCommon.h"
>
</File>
<File
RelativePath=".\stormlib\SCompression.cpp"
>
</File>
<File
RelativePath=".\stormlib\SFileCompactArchive.cpp"
>
</File>
<File
RelativePath=".\stormlib\SFileCreateArchiveEx.cpp"
>
</File>
<File
RelativePath=".\stormlib\SFileExtractFile.cpp"
>
</File>
<File
RelativePath=".\stormlib\SFileFindFile.cpp"
>
</File>
<File
RelativePath=".\stormlib\SFileOpenArchive.cpp"
>
</File>
<File
RelativePath=".\stormlib\SFileOpenFileEx.cpp"
>
</File>
<File
RelativePath=".\stormlib\SFileReadFile.cpp"
>
</File>
<File
RelativePath=".\stormlib\SListFile.cpp"
>
</File>
<File
RelativePath=".\stormlib\StormDll.h"
>
</File>
<File
RelativePath=".\stormlib\StormLib.h"
>
</File>
<File
RelativePath=".\stormlib\StormPort.h"
>
</File>
<File
RelativePath=".\stormlib\StormPortLinux.cpp"
>
</File>
<File
RelativePath=".\stormlib\StormPortMac.cpp"
>
</File>
</Filter>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View file

@ -86,8 +86,8 @@ public:
MTRand( const uint32& oneSeed ); // initialize with a simple uint32
MTRand( uint32 *const bigSeed, uint32 const seedLength = N ); // or an array
MTRand(); // auto-initialize with /dev/urandom or time() and clock()
MTRand(const MTRand&); // prevent copy constructor
MTRand& operator=(const MTRand&); // no-op operator=
MTRand(const MTRand&); // prevent copy constructor
MTRand& operator=(const MTRand&); // no-op operator=
// Do NOT use for CRYPTOGRAPHY without securely hashing several returned
// values together, otherwise the generator state can be learned after

View file

@ -641,7 +641,6 @@ void WorldSession::HandlePlayerLogin(LoginQueryHolder * holder)
pCurrChar->LoadCorpse();
// setting Ghost+speed if dead
//if ( pCurrChar->m_deathState == DEAD )
if (pCurrChar->m_deathState != ALIVE)
{
// not blizz like, we must correctly save and load player instead...

View file

@ -218,7 +218,7 @@ struct CreatureInfo
bool isTameable() const
{
return type == CREATURE_TYPE_BEAST && family != 0 && (type_flags & CREATURE_TYPEFLAGS_TAMEBLE);
return type == CREATURE_TYPE_BEAST && family != 0 && (type_flags & CREATURE_TYPEFLAGS_TAMEABLE);
}
};

View file

@ -190,7 +190,7 @@ void GameObject::Update(uint32 /*p_time*/)
if(caster && caster->GetTypeId()==TYPEID_PLAYER)
{
SetGoState(0);
SetUInt32Value(GAMEOBJECT_FLAGS, 32);
SetUInt32Value(GAMEOBJECT_FLAGS, GO_FLAG_NODESPAWN);
UpdateData udata;
WorldPacket packet;

View file

@ -128,26 +128,20 @@ void PlayerMenu::SendGossipMenu( uint32 TitleTextId, uint64 npcGUID )
data << npcGUID;
data << uint32(0); // new 2.4.0
data << uint32( TitleTextId );
data << uint32( mGossipMenu.MenuItemCount() ); // max count 0x0F
data << uint32( mGossipMenu.MenuItemCount() ); // max count 0x0F
for ( unsigned int iI = 0; iI < mGossipMenu.MenuItemCount(); iI++ )
{
GossipMenuItem const& gItem = mGossipMenu.GetItem(iI);
data << uint32( iI );
data << uint8( gItem.m_gIcon );
// icons:
// 0 unlearn talents/misc
// 1 trader
// 2 taxi
// 3 trainer
// 9 BG/arena
data << uint8( gItem.m_gCoded ); // makes pop up box password
data << uint32(gItem.m_gBoxMoney); // money required to open menu, 2.0.3
data << gItem.m_gMessage; // text for gossip item
data << gItem.m_gBoxMessage; // accept text (related to money) pop up box, 2.0.3
}
data << uint32( mQuestMenu.MenuItemCount() ); // max count 0x20
data << uint32( mQuestMenu.MenuItemCount() ); // max count 0x20
for ( uint16 iI = 0; iI < mQuestMenu.MenuItemCount(); iI++ )
{
@ -155,7 +149,7 @@ void PlayerMenu::SendGossipMenu( uint32 TitleTextId, uint64 npcGUID )
uint32 questID = qItem.m_qId;
Quest const* pQuest = objmgr.GetQuestTemplate(questID);
data << questID;
data << uint32(questID);
data << uint32( qItem.m_qIcon );
data << uint32( pQuest ? pQuest->GetQuestLevel() : 0 );
std::string Title = pQuest->GetTitle();
@ -381,8 +375,7 @@ void PlayerMenu::SendQuestGiverQuestList( QEmote eEmote, std::string Title, uint
data << title;
}
pSession->SendPacket( &data );
//uint32 fqid=pQuestMenu->GetItem(0).m_qId;
//sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u, questid-0=%u",npcGUID,fqid);
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_LIST NPC Guid=%u", GUID_LOPART(npcGUID));
}
void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, uint64 npcGUID )
@ -392,7 +385,7 @@ void PlayerMenu::SendQuestGiverStatus( uint8 questStatus, uint64 npcGUID )
data << uint8(questStatus);
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u",GUID_LOPART(npcGUID),questStatus);
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_STATUS NPC Guid=%u, status=%u", GUID_LOPART(npcGUID), questStatus);
}
void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID, bool ActivateAccept )
@ -462,6 +455,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
else
data << uint32(0);
}
data << uint32(pQuest->GetRewOrReqMoney());
}
@ -479,7 +473,7 @@ void PlayerMenu::SendQuestGiverQuestDetails( Quest const *pQuest, uint64 npcGUID
}
pSession->SendPacket( &data );
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId());
sLog.outDebug("WORLD: Sent SMSG_QUESTGIVER_QUEST_DETAILS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId());
}
void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
@ -760,8 +754,10 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
else
data << uint32(0x03);
data << uint32(0x04) << uint32(0x08) << uint32(0x10);
data << uint32(0x04);
data << uint32(0x08);
data << uint32(0x10);
pSession->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_REQUEST_ITEMS NPCGuid=%u, questid=%u", GUID_LOPART(npcGUID), pQuest->GetQuestId() );
}

View file

@ -369,7 +369,7 @@ void WorldSession::HandleItemQuerySingleOpcode( WorldPacket & recv_data )
data << pProto->ArcaneRes;
data << pProto->Delay;
data << pProto->Ammo_type;
data << pProto->AmmoType;
data << pProto->RangedModRange;
for(int s = 0; s < 5; s++)

View file

@ -443,17 +443,15 @@ inline uint8 ItemSubClassToDurabilityMultiplierId(uint32 ItemClass, uint32 ItemS
struct _Damage
{
float DamageMin;
float DamageMax;
uint32 DamageType; // id from Resistances.dbc
float DamageMin;
float DamageMax;
uint32 DamageType; // id from Resistances.dbc
};
struct _ItemStat
{
uint32 ItemStatType;
int32 ItemStatValue;
uint32 ItemStatType;
int32 ItemStatValue;
};
struct _Spell
{
@ -464,7 +462,6 @@ struct _Spell
int32 SpellCooldown;
uint32 SpellCategory; // id from SpellCategory.dbc
int32 SpellCategoryCooldown;
};
struct _Socket
@ -479,7 +476,7 @@ struct ItemPrototype
uint32 Class; // id from ItemClass.dbc
uint32 SubClass; // id from ItemSubClass.dbc
uint32 Unk0;
char* Name1;
char* Name1;
uint32 DisplayInfoID; // id from ItemDisplayInfo.dbc
uint32 Quality;
uint32 Flags;
@ -511,12 +508,11 @@ struct ItemPrototype
uint32 ShadowRes;
uint32 ArcaneRes;
uint32 Delay;
uint32 Ammo_type;
uint32 AmmoType;
float RangedModRange;
_Spell Spells[5];
uint32 Bonding;
char* Description;
char* Description;
uint32 PageText;
uint32 LanguageID;
uint32 PageMaterial;

View file

@ -1028,7 +1028,7 @@ bool ChatHandler::HandleModifyASpeedCommand(const char* args)
chr->SetSpeed(MOVE_RUN, ASpeed,true);
chr->SetSpeed(MOVE_SWIM, ASpeed,true);
//chr->SetSpeed(MOVE_TURN, ASpeed,true);
chr->SetSpeed(MOVE_FLY, ASpeed,true);
chr->SetSpeed(MOVE_FLIGHT, ASpeed,true);
return true;
}
@ -1144,7 +1144,7 @@ bool ChatHandler::HandleModifyBWalkCommand(const char* args)
if (needReportToTarget(chr))
ChatHandler(chr).PSendSysMessage(LANG_YOURS_BACK_SPEED_CHANGED, GetName(), BSpeed);
chr->SetSpeed(MOVE_WALKBACK,BSpeed,true);
chr->SetSpeed(MOVE_RUN_BACK,BSpeed,true);
return true;
}
@ -1176,7 +1176,7 @@ bool ChatHandler::HandleModifyFlyCommand(const char* args)
if (needReportToTarget(chr))
ChatHandler(chr).PSendSysMessage(LANG_YOURS_FLY_SPEED_CHANGED, GetName(), FSpeed);
chr->SetSpeed(MOVE_FLY,FSpeed,true);
chr->SetSpeed(MOVE_FLIGHT,FSpeed,true);
return true;
}

View file

@ -616,7 +616,6 @@ void Map::Update(const uint32 &t_diff)
}
}
// Don't unload grids if it's battleground, since we may have manually added GOs,creatures, those doesn't load from DB at grid re-load !
// This isn't really bother us, since as soon as we have instanced BG-s, the whole map unloads as the BG gets ended
if (IsBattleGroundOrArena())
@ -697,7 +696,7 @@ Map::Remove(T *obj, bool remove)
CellPair p = MaNGOS::ComputeCellPair(obj->GetPositionX(), obj->GetPositionY());
if(p.x_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP || p.y_coord >= TOTAL_NUMBER_OF_CELLS_PER_MAP )
{
sLog.outError("Map::Remove: Object " I64FMTD " have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
sLog.outError("Map::Remove: Object " I64FMT " have invalid coordinates X:%f Y:%f grid cell [%u:%u]", obj->GetGUID(), obj->GetPositionX(), obj->GetPositionY(), p.x_coord, p.y_coord);
return;
}
@ -705,7 +704,7 @@ Map::Remove(T *obj, bool remove)
if( !loaded(GridPair(cell.data.Part.grid_x, cell.data.Part.grid_y)) )
return;
DEBUG_LOG("Remove object " I64FMTD " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
DEBUG_LOG("Remove object " I64FMT " from grid[%u,%u]", obj->GetGUID(), cell.data.Part.grid_x, cell.data.Part.grid_y);
NGridType *grid = getNGrid(cell.GridX(), cell.GridY());
assert( grid != NULL );
@ -959,7 +958,7 @@ bool Map::UnloadGrid(const uint32 &x, const uint32 &y, bool pForce)
if (i_InstanceId == 0)
{
if(GridMaps[gx][gy]) delete (GridMaps[gx][gy]);
// x and y are swaped
// x and y are swapped
VMAP::VMapFactory::createOrGetVMapManager()->unloadMap(GetId(), gy, gx);
}
else
@ -1122,7 +1121,6 @@ uint8 Map::GetTerrainType(float x, float y ) const
return GridMaps[gx][gy]->terrain_type[(int)(lx)][(int)(ly)];
else
return 0;
}
float Map::GetWaterLevel(float x, float y ) const

View file

@ -1380,7 +1380,7 @@ void WorldSession::HandleFarSightOpcode( WorldPacket & recv_data )
sLog.outDebug("Removed FarSight from player %u", _player->GetGUIDLow());
break;
case 1:
sLog.outDebug("Added FarSight " I64FMTD " to player %u", _player->GetUInt64Value(PLAYER_FARSIGHT), _player->GetGUIDLow());
sLog.outDebug("Added FarSight " I64FMT " to player %u", _player->GetFarSight(), _player->GetGUIDLow());
break;
}
}
@ -1395,9 +1395,9 @@ void WorldSession::HandleChooseTitleOpcode( WorldPacket & recv_data )
recv_data >> title;
// -1 at none
if(title > 0 && title < 64)
if(title > 0 && title < 128)
{
if(!GetPlayer()->HasFlag64(PLAYER__FIELD_KNOWN_TITLES,uint64(1) << title))
if(!GetPlayer()->HasTitle(title))
return;
}
else

View file

@ -461,19 +461,19 @@ void WorldSession::HandleForceSpeedChangeAck(WorldPacket &recv_data)
UnitMoveType move_type;
UnitMoveType force_move_type;
static char const* move_type_name[MAX_MOVE_TYPE] = { "Walk", "Run", "Walkback", "Swim", "Swimback", "Turn", "Fly", "Flyback" };
static char const* move_type_name[MAX_MOVE_TYPE] = { "Walk", "Run", "RunBack", "Swim", "SwimBack", "TurnRate", "Flight", "FlightBack" };
uint16 opcode = recv_data.GetOpcode();
switch(opcode)
{
case CMSG_FORCE_WALK_SPEED_CHANGE_ACK: move_type = MOVE_WALK; force_move_type = MOVE_WALK; break;
case CMSG_FORCE_RUN_SPEED_CHANGE_ACK: move_type = MOVE_RUN; force_move_type = MOVE_RUN; break;
case CMSG_FORCE_RUN_BACK_SPEED_CHANGE_ACK: move_type = MOVE_WALKBACK; force_move_type = MOVE_WALKBACK; break;
case CMSG_FORCE_SWIM_SPEED_CHANGE_ACK: move_type = MOVE_SWIM; force_move_type = MOVE_SWIM; break;
case CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK: move_type = MOVE_SWIMBACK; force_move_type = MOVE_SWIMBACK; break;
case CMSG_FORCE_TURN_RATE_CHANGE_ACK: move_type = MOVE_TURN; force_move_type = MOVE_TURN; break;
case CMSG_FORCE_FLIGHT_SPEED_CHANGE_ACK: move_type = MOVE_FLY; force_move_type = MOVE_FLY; break;
case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLYBACK; force_move_type = MOVE_FLYBACK; break;
case CMSG_FORCE_WALK_SPEED_CHANGE_ACK: move_type = MOVE_WALK; force_move_type = MOVE_WALK; break;
case CMSG_FORCE_RUN_SPEED_CHANGE_ACK: move_type = MOVE_RUN; force_move_type = MOVE_RUN; break;
case CMSG_FORCE_RUN_BACK_SPEED_CHANGE_ACK: move_type = MOVE_RUN_BACK; force_move_type = MOVE_RUN_BACK; break;
case CMSG_FORCE_SWIM_SPEED_CHANGE_ACK: move_type = MOVE_SWIM; force_move_type = MOVE_SWIM; break;
case CMSG_FORCE_SWIM_BACK_SPEED_CHANGE_ACK: move_type = MOVE_SWIM_BACK; force_move_type = MOVE_SWIM_BACK; break;
case CMSG_FORCE_TURN_RATE_CHANGE_ACK: move_type = MOVE_TURN_RATE; force_move_type = MOVE_TURN_RATE; break;
case CMSG_FORCE_FLIGHT_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT; force_move_type = MOVE_FLIGHT; break;
case CMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE_ACK: move_type = MOVE_FLIGHT_BACK; force_move_type = MOVE_FLIGHT_BACK; break;
default:
sLog.outError("WorldSession::HandleForceSpeedChangeAck: Unknown move type opcode: %u", opcode);
return;

View file

@ -551,9 +551,9 @@ void WorldSession::SendStablePet(uint64 guid )
void WorldSession::HandleStablePet( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8);
CHECK_PACKET_SIZE(recv_data, 8);
sLog.outDebug("WORLD: Recv CMSG_STABLE_PET not dispose.");
sLog.outDebug("WORLD: Recv CMSG_STABLE_PET");
uint64 npcGUID;
recv_data >> npcGUID;
@ -614,7 +614,7 @@ void WorldSession::HandleStablePet( WorldPacket & recv_data )
void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8+4);
CHECK_PACKET_SIZE(recv_data, 8+4);
sLog.outDebug("WORLD: Recv CMSG_UNSTABLE_PET.");
uint64 npcGUID;
@ -674,7 +674,7 @@ void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
void WorldSession::HandleBuyStableSlot( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8);
CHECK_PACKET_SIZE(recv_data, 8);
sLog.outDebug("WORLD: Recv CMSG_BUY_STABLE_SLOT.");
uint64 npcGUID;
@ -719,7 +719,7 @@ void WorldSession::HandleStableRevivePet( WorldPacket &/* recv_data */)
void WorldSession::HandleStableSwapPet( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8+4);
CHECK_PACKET_SIZE(recv_data, 8+4);
sLog.outDebug("WORLD: Recv CMSG_STABLE_SWAP_PET.");
uint64 npcGUID;
@ -774,7 +774,7 @@ void WorldSession::HandleStableSwapPet( WorldPacket & recv_data )
void WorldSession::HandleRepairItemOpcode( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8+8+1);
CHECK_PACKET_SIZE(recv_data, 8+8+1);
sLog.outDebug("WORLD: CMSG_REPAIR_ITEM");

View file

@ -376,12 +376,12 @@ void Object::_BuildMovementUpdate(ByteBuffer * data, uint8 flags, uint32 flags2
*data << ((Unit*)this)->GetSpeed( MOVE_WALK );
*data << ((Unit*)this)->GetSpeed( MOVE_RUN );
*data << ((Unit*)this)->GetSpeed( MOVE_SWIMBACK );
*data << ((Unit*)this)->GetSpeed( MOVE_SWIM_BACK );
*data << ((Unit*)this)->GetSpeed( MOVE_SWIM );
*data << ((Unit*)this)->GetSpeed( MOVE_WALKBACK );
*data << ((Unit*)this)->GetSpeed( MOVE_FLY );
*data << ((Unit*)this)->GetSpeed( MOVE_FLYBACK );
*data << ((Unit*)this)->GetSpeed( MOVE_TURN );
*data << ((Unit*)this)->GetSpeed( MOVE_RUN_BACK );
*data << ((Unit*)this)->GetSpeed( MOVE_FLIGHT );
*data << ((Unit*)this)->GetSpeed( MOVE_FLIGHT_BACK );
*data << ((Unit*)this)->GetSpeed( MOVE_TURN_RATE );
// 0x08000000
if(flags2 & MOVEMENTFLAG_SPLINE2)
@ -625,7 +625,7 @@ void Object::_BuildValuesUpdate(uint8 updatetype, ByteBuffer * data, UpdateMask
*data << uint32(1);
break;
default:
*data << uint32(0); //unknown. not happen.
*data << uint32(0); // unknown. not happen.
break;
}
}
@ -934,6 +934,56 @@ void Object::RemoveFlag( uint16 index, uint32 oldFlag )
}
}
void Object::SetByteFlag( uint16 index, uint8 offset, uint8 newFlag )
{
ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
if(offset > 4)
{
sLog.outError("Object::SetByteFlag: wrong offset %u", offset);
return;
}
if(!(uint8(m_uint32Values[ index ] >> (offset * 8)) & newFlag))
{
m_uint32Values[ index ] |= uint32(uint32(newFlag) << (offset * 8));
if(m_inWorld)
{
if(!m_objectUpdated)
{
ObjectAccessor::Instance().AddUpdateObject(this);
m_objectUpdated = true;
}
}
}
}
void Object::RemoveByteFlag( uint16 index, uint8 offset, uint8 oldFlag )
{
ASSERT( index < m_valuesCount || PrintIndexError( index , true ) );
if(offset > 4)
{
sLog.outError("Object::RemoveByteFlag: wrong offset %u", offset);
return;
}
if(uint8(m_uint32Values[ index ] >> (offset * 8)) & oldFlag)
{
m_uint32Values[ index ] &= ~uint32(uint32(oldFlag) << (offset * 8));
if(m_inWorld)
{
if(!m_objectUpdated)
{
ObjectAccessor::Instance().AddUpdateObject(this);
m_objectUpdated = true;
}
}
}
}
bool Object::PrintIndexError(uint32 index, bool set) const
{
sLog.outError("ERROR: Attempt %s non-existed value field: %u (count: %u) for object typeid: %u type mask: %u",(set ? "set value to" : "get value from"),index,m_valuesCount,GetTypeId(),m_objectType);

View file

@ -226,6 +226,24 @@ class MANGOS_DLL_SPEC Object
return (m_uint32Values[ index ] & flag) != 0;
}
void SetByteFlag( uint16 index, uint8 offset, uint8 newFlag );
void RemoveByteFlag( uint16 index, uint8 offset, uint8 newFlag );
void ToggleFlag( uint16 index, uint8 offset, uint8 flag )
{
if(HasByteFlag(index, offset, flag))
RemoveByteFlag(index, offset, flag);
else
SetByteFlag(index, offset, flag);
}
bool HasByteFlag( uint16 index, uint8 offset, uint8 flag ) const
{
ASSERT( index < m_valuesCount || PrintIndexError( index , false ) );
ASSERT( offset < 4 );
return (((uint8*)&m_uint32Values[index])[offset] & flag) != 0;
}
void ApplyModFlag( uint16 index, uint32 flag, bool apply)
{
if(apply) SetFlag(index,flag); else RemoveFlag(index,flag);
@ -297,7 +315,7 @@ class MANGOS_DLL_SPEC Object
{
int32 *m_int32Values;
uint32 *m_uint32Values;
float *m_floatValues;
float *m_floatValues;
};
uint32 *m_uint32Values_mirror;

View file

@ -45,7 +45,6 @@ INSTANTIATE_CLASS_MUTEX(ObjectAccessor, ZThread::FastMutex);
namespace MaNGOS
{
struct MANGOS_DLL_DECL BuildUpdateForPlayer
{
Player &i_player;
@ -551,7 +550,7 @@ void ObjectAccessor::UpdateVisibilityForPlayer( Player* player )
template <class T> UNORDERED_MAP< uint64, T* > HashMapHolder<T>::m_objectMap;
template <class T> ZThread::FastMutex HashMapHolder<T>::i_lock;
/// Global defintions for the hashmap storage
/// Global definitions for the hashmap storage
template class HashMapHolder<Player>;
template class HashMapHolder<Pet>;

View file

@ -72,7 +72,7 @@ class HashMapHolder
static LockType* GetLock() { return &i_lock; }
private:
//Non instanciable only static
//Non instanceable only static
HashMapHolder() {}
static LockType i_lock;

View file

@ -50,7 +50,7 @@ ObjectGridRespawnMover::Visit(CreatureMapType &m)
{
// creature in unloading grid can have respawn point in another grid
// if it will be unloaded then it will not respawn in original grid until unload/load original grid
// move to respwn point to prevent this case. For player view in respawn grid this wll be normal respawn.
// move to respawn point to prevent this case. For player view in respawn grid this will be normal respawn.
for(CreatureMapType::iterator iter=m.begin(), next; iter != m.end(); iter = next)
{
next = iter; ++next;

View file

@ -841,6 +841,7 @@ class ObjectMgr
int GetOrNewIndexForLocale(LocaleConstant loc);
int DBCLocaleIndex;
private:
void LoadScripts(ScriptMapMap& scripts, char const* tablename);
void CheckScripts(ScriptMapMap const& scripts,std::set<int32>& ids);

View file

@ -138,7 +138,7 @@ OpcodeHandler opcodeTable[NUM_MSG_TYPES] =
/*0x06D*/ { "CMSG_DEL_IGNORE", STATUS_LOGGEDIN, &WorldSession::HandleDelIgnoreOpcode },
/*0x06E*/ { "CMSG_GROUP_INVITE", STATUS_LOGGEDIN, &WorldSession::HandleGroupInviteOpcode },
/*0x06F*/ { "SMSG_GROUP_INVITE", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x070*/ { "CMSG_GROUP_CANCEL", STATUS_LOGGEDIN, &WorldSession::Handle_Depricated },
/*0x070*/ { "CMSG_GROUP_CANCEL", STATUS_LOGGEDIN, &WorldSession::Handle_Deprecated },
/*0x071*/ { "SMSG_GROUP_CANCEL", STATUS_NEVER, &WorldSession::Handle_ServerSide },
/*0x072*/ { "CMSG_GROUP_ACCEPT", STATUS_LOGGEDIN, &WorldSession::HandleGroupAcceptOpcode },
/*0x073*/ { "CMSG_GROUP_DECLINE", STATUS_LOGGEDIN, &WorldSession::HandleGroupDeclineOpcode },

View file

@ -170,7 +170,7 @@ bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool cu
}
Map *map = owner->GetMap();
uint32 guid=objmgr.GenerateLowGuid(HIGHGUID_PET);
uint32 guid = objmgr.GenerateLowGuid(HIGHGUID_PET);
uint32 pet_number = fields[0].GetUInt32();
if(!Create(guid, map, petentry, pet_number))
{
@ -179,7 +179,7 @@ bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool cu
}
float px, py, pz;
owner->GetClosePoint(px, py, pz,GetObjectSize(),PET_FOLLOW_DIST,PET_FOLLOW_ANGLE);
owner->GetClosePoint(px, py, pz, GetObjectSize(), PET_FOLLOW_DIST, PET_FOLLOW_ANGLE);
Relocate(px, py, pz, owner->GetOrientation());
@ -351,7 +351,7 @@ bool Pet::LoadPetFromDB( Unit* owner, uint32 petentry, uint32 petnumber, bool cu
if(owner->GetTypeId() == TYPEID_PLAYER && getPetType() == HUNTER_PET)
{
result = CharacterDatabase.PQuery("SELECT genitive, dative, accusative, instrumental, prepositional FROM character_pet_declinedname WHERE owner = '%u' AND id = '%u'",owner->GetGUIDLow(),GetCharmInfo()->GetPetNumber());
result = CharacterDatabase.PQuery("SELECT genitive, dative, accusative, instrumental, prepositional FROM character_pet_declinedname WHERE owner = '%u' AND id = '%u'", owner->GetGUIDLow(), GetCharmInfo()->GetPetNumber());
if(result)
{
@ -950,14 +950,14 @@ bool Pet::CreateBaseAtCreature(Creature* creature)
}
SetDisplayId(creature->GetDisplayId());
SetNativeDisplayId(creature->GetNativeDisplayId());
SetMaxPower(POWER_HAPPINESS,GetCreatePowers(POWER_HAPPINESS));
SetPower( POWER_HAPPINESS,166500);
SetMaxPower(POWER_HAPPINESS, GetCreatePowers(POWER_HAPPINESS));
SetPower(POWER_HAPPINESS, 166500);
setPowerType(POWER_FOCUS);
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP,0);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE,0);
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, uint32((MaNGOS::XP::xp_to_level(creature->getLevel()))/4));
SetUInt32Value(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE);
SetUInt32Value(UNIT_NPC_FLAGS , 0);
SetUInt32Value(UNIT_NPC_FLAGS, 0);
CreatureFamilyEntry const* cFamily = sCreatureFamilyStore.LookupEntry(creature->GetCreatureInfo()->family);
if( char* familyname = cFamily->Name[sWorld.GetDefaultDbcLocale()] )
@ -993,7 +993,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
uint32 creature_ID = (getPetType() == HUNTER_PET) ? 1 : cinfo->Entry;
SetLevel( petlevel);
SetLevel(petlevel);
SetMeleeDamageSchool(SpellSchools(cinfo->dmgschool));
@ -1082,7 +1082,7 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
for(int stat = 0; stat < MAX_STATS; ++stat)
{
SetCreateStat(Stats(stat),float(pInfo->stats[stat]));
SetCreateStat(Stats(stat), float(pInfo->stats[stat]));
}
}
else // not exist in DB, use some default fake data
@ -1093,11 +1093,11 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
SetCreateHealth(uint32(((float(cinfo->maxhealth) / cinfo->maxlevel) / (1 + 2 * cinfo->rank)) * petlevel) );
SetCreateMana( uint32(((float(cinfo->maxmana) / cinfo->maxlevel) / (1 + 2 * cinfo->rank)) * petlevel) );
SetCreateStat(STAT_STRENGTH,22);
SetCreateStat(STAT_AGILITY,22);
SetCreateStat(STAT_STAMINA,25);
SetCreateStat(STAT_INTELLECT,28);
SetCreateStat(STAT_SPIRIT,27);
SetCreateStat(STAT_STRENGTH, 22);
SetCreateStat(STAT_AGILITY, 22);
SetCreateStat(STAT_STAMINA, 25);
SetCreateStat(STAT_INTELLECT, 28);
SetCreateStat(STAT_SPIRIT, 27);
}
break;
}
@ -1132,34 +1132,35 @@ bool Pet::InitStatsForLevel(uint32 petlevel)
// remove elite bonuses included in DB values
SetCreateHealth( uint32(((float(cinfo->maxhealth) / cinfo->maxlevel) / (1 + 2 * cinfo->rank)) * petlevel) );
SetCreateStat(STAT_STRENGTH,22);
SetCreateStat(STAT_AGILITY,22);
SetCreateStat(STAT_STAMINA,25);
SetCreateStat(STAT_INTELLECT,28);
SetCreateStat(STAT_SPIRIT,27);
SetCreateStat(STAT_STRENGTH, 22);
SetCreateStat(STAT_AGILITY, 22);
SetCreateStat(STAT_STAMINA, 25);
SetCreateStat(STAT_INTELLECT, 28);
SetCreateStat(STAT_SPIRIT, 27);
}
break;
}
case GUARDIAN_PET:
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE,0);
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP,1000);
SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
SetCreateMana( 28 + 10*petlevel );
SetCreateHealth( 28 + 30*petlevel );
SetCreateMana(28 + 10*petlevel);
SetCreateHealth(28 + 30*petlevel);
// FIXME: this is wrong formula, possible each guardian pet have own damage formula
//these formula may not be correct; however, it is designed to be close to what it should be
//this makes dps 0.5 of pets level
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)) );
SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, float(petlevel - (petlevel / 4)));
//damage range is then petlevel / 2
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)) );
SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, float(petlevel + (petlevel / 4)));
break;
default:
sLog.outError("Pet have incorrect type (%u) for levelup.",getPetType()); break;
sLog.outError("Pet have incorrect type (%u) for levelup.", getPetType());
break;
}
for (int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i)
SetModifierValue(UnitMods(UNIT_MOD_RESISTANCE_START + i), BASE_VALUE, float(createResistance[i]) );
SetModifierValue(UnitMods(UNIT_MOD_RESISTANCE_START + i), BASE_VALUE, float(createResistance[i]));
UpdateAllStats();
@ -1190,7 +1191,7 @@ bool Pet::HaveInDiet(ItemPrototype const* item) const
uint32 Pet::GetCurrentFoodBenefitLevel(uint32 itemlevel)
{
// -5 or greater food level
if(getLevel() <= itemlevel +5) //possible to feed level 60 pet with level 55 level food for full effect
if(getLevel() <= itemlevel + 5) //possible to feed level 60 pet with level 55 level food for full effect
return 35000;
// -10..-6
else if(getLevel() <= itemlevel + 10) //pure guess, but sounds good
@ -1240,7 +1241,7 @@ void Pet::_LoadSpellCooldowns()
_AddCreatureSpellCooldown(spell_id,db_time);
sLog.outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).",m_charmInfo->GetPetNumber(),spell_id,uint32(db_time-curTime));
sLog.outDebug("Pet (Number: %u) spell %u cooldown loaded (%u secs).", m_charmInfo->GetPetNumber(), spell_id, uint32(db_time-curTime));
}
while( result->NextRow() );
@ -1387,7 +1388,7 @@ void Pet::_LoadAuras(uint32 timediff)
void Pet::_SaveAuras()
{
CharacterDatabase.PExecute("DELETE FROM pet_aura WHERE guid = '%u'",m_charmInfo->GetPetNumber());
CharacterDatabase.PExecute("DELETE FROM pet_aura WHERE guid = '%u'", m_charmInfo->GetPetNumber());
AuraMap const& auras = GetAuras();
if (auras.empty())
@ -1762,7 +1763,7 @@ void Pet::CastPetAuras(bool current)
if(getPetType() != HUNTER_PET && (getPetType() != SUMMON_PET || owner->getClass() != CLASS_WARLOCK))
return;
for(PetAuraSet::iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end(); )
for(PetAuraSet::iterator itr = owner->m_petAuras.begin(); itr != owner->m_petAuras.end();)
{
PetAura const* pa = *itr;
++itr;
@ -1783,7 +1784,7 @@ void Pet::CastPetAura(PetAura const* aura)
if(auraId == 35696) // Demonic Knowledge
{
int32 basePoints = int32(aura->GetDamage() * (GetStat(STAT_STAMINA) + GetStat(STAT_INTELLECT)) / 100);
CastCustomSpell(this,auraId,&basePoints, NULL, NULL, true );
CastCustomSpell(this, auraId, &basePoints, NULL, NULL, true);
}
else
CastSpell(this, auraId, true);

View file

@ -78,6 +78,7 @@ struct PetSpell
{
uint16 slotId;
uint16 active;
PetSpellState state : 16;
PetSpellType type : 16;
};
@ -144,7 +145,7 @@ class Pet : public Creature
bool isTemporarySummoned() const { return m_duration > 0; }
bool Create (uint32 guidlow, Map *map, uint32 Entry, uint32 pet_number);
bool CreateBaseAtCreature( Creature* creature );
bool CreateBaseAtCreature(Creature* creature);
bool LoadPetFromDB( Unit* owner,uint32 petentry = 0,uint32 petnumber = 0, bool current = false );
void SavePetToDB(PetSaveMode mode);
void Remove(PetSaveMode mode, bool returnreagent = false);

View file

@ -34,7 +34,7 @@
void WorldSession::HandlePetAction( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8+2+2+8);
CHECK_PACKET_SIZE(recv_data, 8+2+2+8);
uint64 guid1;
uint16 spellid;
@ -46,8 +46,8 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
recv_data >> guid2; //tag guid
// used also for charmed creature
Unit* pet= ObjectAccessor::GetUnit(*_player,guid1);
sLog.outDetail( "HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.\n", uint32(GUID_LOPART(guid1)), flag, spellid, uint32(GUID_LOPART(guid2)) );
Unit* pet= ObjectAccessor::GetUnit(*_player, guid1);
sLog.outDetail("HandlePetAction.Pet %u flag is %u, spellid is %u, target %u.\n", uint32(GUID_LOPART(guid1)), flag, spellid, uint32(GUID_LOPART(guid2)) );
if(!pet)
{
sLog.outError( "Pet %u not exist.\n", uint32(GUID_LOPART(guid1)) );
@ -56,7 +56,7 @@ void WorldSession::HandlePetAction( WorldPacket & recv_data )
if(pet != GetPlayer()->GetPet() && pet != GetPlayer()->GetCharm())
{
sLog.outError( "HandlePetAction.Pet %u isn't pet of player %s .\n", uint32(GUID_LOPART(guid1)),GetPlayer()->GetName() );
sLog.outError("HandlePetAction.Pet %u isn't pet of player %s.\n", uint32(GUID_LOPART(guid1)), GetPlayer()->GetName() );
return;
}
@ -310,7 +310,7 @@ void WorldSession::SendPetNameQuery( uint64 petguid, uint32 petnumber)
void WorldSession::HandlePetSetAction( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8+4+2+2);
CHECK_PACKET_SIZE(recv_data, 8+4+2+2);
sLog.outDetail( "HandlePetSetAction. CMSG_PET_SET_ACTION\n" );

View file

@ -173,7 +173,7 @@ void PlayerTaxi::AppendTaximaskTo( ByteBuffer& data, bool all )
if(all)
{
for (uint8 i=0; i<TaxiMaskSize; i++)
data << sTaxiNodesMask[i]; // all existed nodes
data << uint32(sTaxiNodesMask[i]); // all existed nodes
}
else
{
@ -494,13 +494,6 @@ bool Player::Create( uint32 guidlow, std::string name, uint8 race, uint8 class_,
for (int i = 0; i < PLAYER_SLOTS_COUNT; i++)
m_items[i] = NULL;
//for(int j = BUYBACK_SLOT_START; j < BUYBACK_SLOT_END; j++)
//{
// SetUInt64Value(PLAYER_FIELD_VENDORBUYBACK_SLOT_1+j*2,0);
// SetUInt32Value(PLAYER_FIELD_BUYBACK_PRICE_1+j,0);
// SetUInt32Value(PLAYER_FIELD_BUYBACK_TIMESTAMP_1+j,0);
//}
m_race = race;
m_class = class_;
@ -796,9 +789,8 @@ void Player::EnvironmentalDamage(uint64 guid, EnviromentalDamage type, uint32 da
data << (uint32)damage;
data << (uint32)0;
data << (uint32)0;
//m_session->SendPacket(&data);
//Let other players see that you get damage
SendMessageToSet(&data, true);
DealDamage(this, damage, NULL, SELF_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false);
if(type==DAMAGE_FALL && !isAlive()) // DealDamage not apply item durability loss at self damage
@ -844,7 +836,7 @@ void Player::HandleDrowning()
m_isunderwater|= 0x04;
StartMirrorTimer(BREATH_TIMER, UnderWaterTime);
}
//continius trigger drowning "Damage"
//continuous trigger drowning "Damage"
if ((m_breathTimer == 0) && (m_isunderwater & 0x01))
{
//TODO: Check this formula
@ -966,7 +958,7 @@ void Player::SetDrunkValue(uint16 newDrunkenValue, uint32 itemId)
return;
WorldPacket data(SMSG_CROSSED_INEBRIATION_THRESHOLD, (8+4+4));
data << GetGUID();
data << uint64(GetGUID());
data << uint32(newDrunkenState);
data << uint32(itemId);
@ -1339,7 +1331,7 @@ void Player::BuildEnumData( QueryResult * result, WorldPacket * p_data )
*p_data << uint8(getLevel()); // player level
// do not use GetMap! it will spawn a new instance since the bound instances are not loaded
uint32 zoneId = MapManager::Instance().GetZoneId(GetMapId(), GetPositionX(),GetPositionY());
sLog.outDebug("Player::BuildEnumData: m:%u, x:%f, y:%f, z:%f zone:%u", GetMapId(), GetPositionX(), GetPositionY(), GetPositionZ(), zoneId);
*p_data << zoneId;
*p_data << GetMapId();
@ -2380,7 +2372,6 @@ void Player::SendInitialSpells()
continue;
data << uint16(itr->first);
//data << uint16(itr->second->slotId);
data << uint16(0); // it's not slot id
spellCount +=1;
@ -2407,13 +2398,13 @@ void Player::SendInitialSpells()
data << uint16(sEntry->Category); // spell category
if(sEntry->Category) // may be wrong, but anyway better than nothing...
{
data << uint32(0);
data << uint32(cooldown);
data << uint32(0); // cooldown
data << uint32(cooldown); // category cooldown
}
else
{
data << uint32(cooldown);
data << uint32(0);
data << uint32(cooldown); // cooldown
data << uint32(0); // category cooldown
}
}
@ -3399,7 +3390,6 @@ void Player::DestroyForPlayer( Player *target ) const
if(target == this)
{
for(int i = INVENTORY_SLOT_BAG_START; i < BANK_SLOT_BAG_END; i++)
{
if(m_items[i] == NULL)
@ -6453,23 +6443,23 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto,uint8 slot,bool apply)
break;
case ITEM_MOD_AGILITY: // modify agility
HandleStatModifier(UNIT_MOD_STAT_AGILITY, BASE_VALUE, float(val), apply);
ApplyStatBuffMod(STAT_AGILITY, val, apply);
ApplyStatBuffMod(STAT_AGILITY, float(val), apply);
break;
case ITEM_MOD_STRENGTH: //modify strength
HandleStatModifier(UNIT_MOD_STAT_STRENGTH, BASE_VALUE, float(val), apply);
ApplyStatBuffMod(STAT_STRENGTH, val, apply);
ApplyStatBuffMod(STAT_STRENGTH, float(val), apply);
break;
case ITEM_MOD_INTELLECT: //modify intellect
HandleStatModifier(UNIT_MOD_STAT_INTELLECT, BASE_VALUE, float(val), apply);
ApplyStatBuffMod(STAT_INTELLECT, val, apply);
ApplyStatBuffMod(STAT_INTELLECT, float(val), apply);
break;
case ITEM_MOD_SPIRIT: //modify spirit
HandleStatModifier(UNIT_MOD_STAT_SPIRIT, BASE_VALUE, float(val), apply);
ApplyStatBuffMod(STAT_SPIRIT, val, apply);
ApplyStatBuffMod(STAT_SPIRIT, float(val), apply);
break;
case ITEM_MOD_STAMINA: //modify stamina
HandleStatModifier(UNIT_MOD_STAT_STAMINA, BASE_VALUE, float(val), apply);
ApplyStatBuffMod(STAT_STAMINA, val, apply);
ApplyStatBuffMod(STAT_STAMINA, float(val), apply);
break;
case ITEM_MOD_DEFENSE_SKILL_RATING:
ApplyRatingMod(CR_DEFENSE_SKILL, int32(val), apply);
@ -8847,7 +8837,7 @@ uint8 Player::_CanStoreItem( uint8 bag, uint8 slot, ItemPosCountVec &dest, uint3
}
else // equipped bag
{
// we need check 2 time (specilized/non_specialized), use NULL_BAG to prevent skipping bag
// we need check 2 time (specialized/non_specialized), use NULL_BAG to prevent skipping bag
res = _CanStoreItem_InBag(bag,dest,pProto,count,true,false,pItem,NULL_BAG,slot);
if(res!=EQUIP_ERR_OK)
res = _CanStoreItem_InBag(bag,dest,pProto,count,true,true,pItem,NULL_BAG,slot);
@ -10305,7 +10295,6 @@ void Player::DestroyItem( uint8 bag, uint8 slot, bool update )
if( bag == INVENTORY_SLOT_BAG_0 )
{
SetUInt64Value((uint16)(PLAYER_FIELD_INV_SLOT_HEAD + (slot*2)), 0);
// equipment and equipped bags can have applied bonuses
@ -12136,7 +12125,7 @@ void Player::RewardQuest( Quest const *pQuest, uint32 reward, Object* questGiver
if(pQuest->GetCharTitleId())
{
if(CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(pQuest->GetCharTitleId()))
SetFlag64(PLAYER__FIELD_KNOWN_TITLES, (uint64(1) << titleEntry->bit_index));
SetTitle(titleEntry);
}
// Send reward mail
@ -13153,7 +13142,7 @@ void Player::SendQuestComplete( uint32 quest_id )
if( quest_id )
{
WorldPacket data( SMSG_QUESTUPDATE_COMPLETE, 4 );
data << quest_id;
data << uint32(quest_id);
GetSession()->SendPacket( &data );
sLog.outDebug( "WORLD: Sent SMSG_QUESTUPDATE_COMPLETE quest = %u", quest_id );
}
@ -13673,14 +13662,14 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
SetUInt32Value(UNIT_CHANNEL_SPELL,0);
// clear charm/summon related fields
SetUInt64Value(UNIT_FIELD_CHARM,0);
SetUInt64Value(UNIT_FIELD_SUMMON,0);
SetUInt64Value(UNIT_FIELD_CHARMEDBY,0);
SetUInt64Value(UNIT_FIELD_SUMMONEDBY,0);
SetUInt64Value(UNIT_FIELD_CREATEDBY,0);
SetCharm(NULL);
SetPet(NULL);
SetCharmerGUID(NULL);
SetOwnerGUID(NULL);
SetCreatorGUID(NULL);
// reset some aura modifiers before aura apply
SetUInt64Value(PLAYER_FARSIGHT, 0);
SetFarSight(NULL);
SetUInt32Value(PLAYER_TRACK_CREATURES, 0 );
SetUInt32Value(PLAYER_TRACK_RESOURCES, 0 );
@ -13765,7 +13754,7 @@ bool Player::LoadFromDB( uint32 guid, SqlQueryHolder *holder )
// note: PLAYER__FIELD_KNOWN_TITLES updated at quest status loaded
if(uint32 curTitle = GetUInt32Value(PLAYER_CHOSEN_TITLE))
{
if(!HasFlag64(PLAYER__FIELD_KNOWN_TITLES,uint64(1) << curTitle))
if(!HasTitle(curTitle))
SetUInt32Value(PLAYER_CHOSEN_TITLE,0);
}
@ -14380,7 +14369,7 @@ void Player::_LoadQuestStatus(QueryResult *result)
if(pQuest->GetCharTitleId())
{
if(CharTitlesEntry const* titleEntry = sCharTitlesStore.LookupEntry(pQuest->GetCharTitleId()))
SetFlag64(PLAYER__FIELD_KNOWN_TITLES, (uint64(1) << titleEntry->bit_index));
SetTitle(titleEntry);
}
}
@ -15673,8 +15662,8 @@ void Player::RemovePet(Pet* pet, PetSaveMode mode, bool returnreagent)
m_guardianPets.erase(pet->GetGUID());
break;
default:
if(GetPetGUID()==pet->GetGUID())
SetPet(0);
if(GetPetGUID() == pet->GetGUID())
SetPet(NULL);
break;
}
@ -18249,7 +18238,7 @@ Player* Player::GetNextRandomRaidMember(float radius)
void Player::UpdateUnderwaterState( Map* m, float x, float y, float z )
{
float water_z = m->GetWaterLevel(x,y);
float height_z = m->GetHeight(x,y,z, false); // use .map base surface height
float height_z = m->GetHeight(x,y,z, false); // use .map base surface height
uint8 flag1 = m->GetTerrainType(x,y);
//!Underwater check, not in water if underground or above water level
@ -18292,11 +18281,28 @@ bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
bool Player::isAllowUseBattleGroundObject()
{
return ( //InBattleGround() && // in battleground - not need, check in other cases
!IsMounted() && // not mounted
!HasStealthAura() && // not stealthed
!HasInvisibilityAura() && // not invisible
!HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup
isAlive() // live player
return ( //InBattleGround() && // in battleground - not need, check in other cases
!IsMounted() && // not mounted
!HasStealthAura() && // not stealthed
!HasInvisibilityAura() && // not invisible
!HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup
isAlive() // live player
);
}
bool Player::HasTitle(uint32 bitIndex)
{
if (bitIndex > 128)
return false;
uint32 fieldIndexOffset = bitIndex/32;
uint32 flag = 1 << (bitIndex%32);
return HasFlag(PLAYER__FIELD_KNOWN_TITLES+fieldIndexOffset, flag);
}
void Player::SetTitle(CharTitlesEntry const* title)
{
uint32 fieldIndexOffset = title->bit_index/32;
uint32 flag = 1 << (title->bit_index%32);
SetFlag(PLAYER__FIELD_KNOWN_TITLES+fieldIndexOffset, flag);
}

View file

@ -516,10 +516,10 @@ typedef std::map<uint32, QuestStatusData> QuestStatusMap;
enum QuestSlotOffsets
{
QUEST_ID_OFFSET = 0,
QUEST_STATE_OFFSET = 1,
QUEST_ID_OFFSET = 0,
QUEST_STATE_OFFSET = 1,
QUEST_COUNTS_OFFSET = 2,
QUEST_TIME_OFFSET = 3
QUEST_TIME_OFFSET = 3
};
#define MAX_QUEST_OFFSET 4
@ -1683,6 +1683,7 @@ class MANGOS_DLL_SPEC Player : public Unit
FactionStateList m_factions;
ForcedReactions m_forcedReactions;
FactionStateList const& GetFactionStateList() { return m_factions; }
uint32 GetDefaultReputationFlags(const FactionEntry *factionEntry) const;
int32 GetBaseReputation(const FactionEntry *factionEntry) const;
int32 GetReputation(uint32 faction_id) const;
@ -1919,6 +1920,9 @@ class MANGOS_DLL_SPEC Player : public Unit
void SetClientControl(Unit* target, uint8 allowMove);
uint64 GetFarSight() const { return GetUInt64Value(PLAYER_FARSIGHT); }
void SetFarSight(uint64 guid) { SetUInt64Value(PLAYER_FARSIGHT, guid); }
// Transports
Transport * GetTransport() const { return m_transport; }
void SetTransport(Transport * t) { m_transport = t; }
@ -2024,6 +2028,9 @@ class MANGOS_DLL_SPEC Player : public Unit
WorldLocation& GetTeleportDest() { return m_teleport_dest; }
DeclinedName const* GetDeclinedNames() const { return m_declinedname; }
bool HasTitle(uint32 bitIndex);
bool HasTitle(CharTitlesEntry const* title) { return HasTitle(title->bit_index); }
void SetTitle(CharTitlesEntry const* title);
protected:

View file

@ -112,24 +112,24 @@ enum __QuestGiverStatus
enum __QuestFlags
{
// Flags used at server and sended to client
QUEST_FLAGS_STAY_ALIVE = 1, // Not used currently
QUEST_FLAGS_PARTY_ACCEPT = 2, // Not used currently. If player in party, all players that can accept this quest will receive confirmation box to accept quest CMSG_QUEST_CONFIRM_ACCEPT/SMSG_QUEST_CONFIRM_ACCEPT
QUEST_FLAGS_EXPLORATION = 4, // Not used currently
QUEST_FLAGS_SHARABLE = 8, // Can be shared: Player::CanShareQuest()
//QUEST_FLAGS_NONE2 = 16, // Not used currently
QUEST_FLAGS_EPIC = 32, // Not used currently: Unsure of content
QUEST_FLAGS_RAID = 64, // Not used currently
QUEST_FLAGS_TBC = 128, // Not used currently: Available if TBC expension enabled only
QUEST_FLAGS_UNK2 = 256, // Not used currently: _DELIVER_MORE Quest needs more than normal _q-item_ drops from mobs
QUEST_FLAGS_HIDDEN_REWARDS = 512, // Items and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD (not in SMSG_QUESTGIVER_QUEST_DETAILS or in client quest log(SMSG_QUEST_QUERY_RESPONSE))
QUEST_FLAGS_AUTO_REWARDED = 1024, // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
QUEST_FLAGS_TBC_RACES = 2048, // Not used currently: Bloodelf/draenei starting zone quests
QUEST_FLAGS_DAILY = 4096, // Used to know quest is Daily one
// Flags used at server and sent to client
QUEST_FLAGS_STAY_ALIVE = 0x00000001, // Not used currently
QUEST_FLAGS_PARTY_ACCEPT = 0x00000002, // Not used currently. If player in party, all players that can accept this quest will receive confirmation box to accept quest CMSG_QUEST_CONFIRM_ACCEPT/SMSG_QUEST_CONFIRM_ACCEPT
QUEST_FLAGS_EXPLORATION = 0x00000004, // Not used currently
QUEST_FLAGS_SHARABLE = 0x00000008, // Can be shared: Player::CanShareQuest()
//QUEST_FLAGS_NONE2 = 0x00000010, // Not used currently
QUEST_FLAGS_EPIC = 0x00000020, // Not used currently: Unsure of content
QUEST_FLAGS_RAID = 0x00000040, // Not used currently
QUEST_FLAGS_TBC = 0x00000080, // Not used currently: Available if TBC expension enabled only
QUEST_FLAGS_UNK2 = 0x00000100, // Not used currently: _DELIVER_MORE Quest needs more than normal _q-item_ drops from mobs
QUEST_FLAGS_HIDDEN_REWARDS = 0x00000200, // Items and money rewarded only sent in SMSG_QUESTGIVER_OFFER_REWARD (not in SMSG_QUESTGIVER_QUEST_DETAILS or in client quest log(SMSG_QUEST_QUERY_RESPONSE))
QUEST_FLAGS_AUTO_REWARDED = 0x00000400, // These quests are automatically rewarded on quest complete and they will never appear in quest log client side.
QUEST_FLAGS_TBC_RACES = 0x00000800, // Not used currently: Blood elf/Draenei starting zone quests
QUEST_FLAGS_DAILY = 0x00001000, // Used to know quest is Daily one
// Mangos flags for set SpecialFlags in DB if required but used only at server
QUEST_MANGOS_FLAGS_REPEATABLE = 0x010000, // Set by 1 in SpecialFlags from DB
QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT = 0x020000, // Set by 2 in SpecialFlags from DB (if reequired area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script DLL)
QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT = 0x020000, // Set by 2 in SpecialFlags from DB (if required area explore, spell SPELL_EFFECT_QUEST_COMPLETE casting, table `*_script` command SCRIPT_COMMAND_QUEST_EXPLORED use, set from script DLL)
QUEST_MANGOS_FLAGS_DB_ALLOWED = 0xFFFF | QUEST_MANGOS_FLAGS_REPEATABLE | QUEST_MANGOS_FLAGS_EXPLORATION_OR_EVENT,
// Mangos flags for internal use only
@ -318,7 +318,7 @@ struct QuestStatusData
: m_status(QUEST_STATUS_NONE),m_rewarded(false),
m_explored(false), m_timer(0), uState(QUEST_NEW)
{
memset(m_itemcount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint32));
memset(m_itemcount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint32));
memset(m_creatureOrGOcount, 0, QUEST_OBJECTIVES_COUNT * sizeof(uint32));
}

View file

@ -553,7 +553,6 @@ enum SpellEffects
SPELL_EFFECT_TRADE_SKILL = 47,
SPELL_EFFECT_STEALTH = 48,
SPELL_EFFECT_DETECT = 49,
// SPELL_EFFECT_SUMMON_OBJECT = 50,
SPELL_EFFECT_TRANS_DOOR = 50,
SPELL_EFFECT_FORCE_CRITICAL_HIT = 51,
SPELL_EFFECT_GUARANTEE_HIT = 52,
@ -766,7 +765,7 @@ enum SpellImmunity
IMMUNITY_MECHANIC = 5 // enum Mechanics
};
#define MAX_SPELL_IMMUNITY 6
#define MAX_SPELL_IMMUNITY 6
enum Targets
{
@ -831,7 +830,7 @@ enum SpellMissInfo
SPELL_MISS_IMMUNE2 = 8,
SPELL_MISS_DEFLECT = 9,
SPELL_MISS_ABSORB = 10,
SPELL_MISS_REFLECT = 11,
SPELL_MISS_REFLECT = 11
};
enum SpellHitType
@ -903,13 +902,13 @@ enum GameobjectTypes
enum GameObjectFlags
{
GO_FLAG_IN_USE = 0x01, //disables interaction while animated
GO_FLAG_LOCKED = 0x02, //require key, spell, event, etc to be opened. Makes "Locked" appear in tooltip
GO_FLAG_INTERACT_COND = 0x04, //cannot interact (condition to interact)
GO_FLAG_TRANSPORT = 0x08, //any kind of transport? Object can transport (elevator, boat, car)
GO_FLAG_UNK1 = 0x10, //
GO_FLAG_NODESPAWN = 0x20, //never despawn, typically for doors, they just change state
GO_FLAG_TRIGGERED = 0x40, //typically, summoned objects. Triggered by spell or other events
GO_FLAG_IN_USE = 0x00000001, //disables interaction while animated
GO_FLAG_LOCKED = 0x00000002, //require key, spell, event, etc to be opened. Makes "Locked" appear in tooltip
GO_FLAG_INTERACT_COND = 0x00000004, //cannot interact (condition to interact)
GO_FLAG_TRANSPORT = 0x00000008, //any kind of transport? Object can transport (elevator, boat, car)
GO_FLAG_UNK1 = 0x00000010, //
GO_FLAG_NODESPAWN = 0x00000020, //never despawn, typically for doors, they just change state
GO_FLAG_TRIGGERED = 0x00000040 //typically, summoned objects. Triggered by spell or other events
};
enum TextEmotes
@ -1503,7 +1502,7 @@ enum CreatureFamily
CREATURE_FAMILY_SPIDER = 3,
CREATURE_FAMILY_BEAR = 4,
CREATURE_FAMILY_BOAR = 5,
CREATURE_FAMILY_CROCILISK = 6,
CREATURE_FAMILY_CROCOLISK = 6,
CREATURE_FAMILY_CARRION_BIRD = 7,
CREATURE_FAMILY_CRAB = 8,
CREATURE_FAMILY_GORILLA = 9,
@ -1533,9 +1532,9 @@ enum CreatureFamily
enum CreatureTypeFlags
{
CREATURE_TYPEFLAGS_TAMEBLE = 0x0001,
CREATURE_TYPEFLAGS_TAMEABLE = 0x0001,
CREATURE_TYPEFLAGS_HERBLOOT = 0x0100,
CREATURE_TYPEFLAGS_MININGLOOT = 0x0200,
CREATURE_TYPEFLAGS_MININGLOOT = 0x0200
};
enum CreatureEliteType

View file

@ -270,6 +270,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
m_triggeringContainer = triggeringContainer;
m_referencedFromCurrentSpell = false;
m_executedCurrently = false;
m_delayStart = 0;
m_delayAtDamageCount = 0;
m_applyMultiplierMask = 0;
@ -2624,17 +2625,13 @@ void Spell::SendSpellStart()
if(!IsNeedSendToClient())
return;
sLog.outDebug("Sending SMSG_SPELL_START id=%u",m_spellInfo->Id);
sLog.outDebug("Sending SMSG_SPELL_START id=%u", m_spellInfo->Id);
uint16 castFlags = CAST_FLAG_UNKNOWN1;
uint32 castFlags = CAST_FLAG_UNKNOWN1;
if(IsRangedSpell())
castFlags |= CAST_FLAG_AMMO;
Unit * target;
if(!m_targets.getUnitTarget())
target = m_caster;
else
target = m_targets.getUnitTarget();
Unit *target = m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster;
WorldPacket data(SMSG_SPELL_START, (8+8+4+4+2));
if(m_CastItem)
@ -2662,17 +2659,13 @@ void Spell::SendSpellGo()
if(!IsNeedSendToClient())
return;
sLog.outDebug("Sending SMSG_SPELL_GO id=%u",m_spellInfo->Id);
sLog.outDebug("Sending SMSG_SPELL_GO id=%u", m_spellInfo->Id);
Unit * target;
if(!m_targets.getUnitTarget())
target = m_caster;
else
target = m_targets.getUnitTarget();
Unit *target = m_targets.getUnitTarget() ? m_targets.getUnitTarget() : m_caster;
uint16 castFlags = CAST_FLAG_UNKNOWN3;
uint32 castFlags = CAST_FLAG_UNKNOWN3;
if(IsRangedSpell())
castFlags |= CAST_FLAG_AMMO;
castFlags |= CAST_FLAG_AMMO; // arrows/bullets visual
WorldPacket data(SMSG_SPELL_GO, 50); // guess size
if(m_CastItem)
@ -2773,7 +2766,7 @@ void Spell::SendLogExecute()
data << uint32(count1); // count1 (effect count?)
for(uint32 i = 0; i < count1; ++i)
{
data << uint32(m_spellInfo->Effect[0]); // spell effect?
data << uint32(m_spellInfo->Effect[0]); // spell effect
uint32 count2 = 1;
data << uint32(count2); // count2 (target count?)
for(uint32 j = 0; j < count2; ++j)
@ -2897,7 +2890,7 @@ void Spell::SendChannelUpdate(uint32 time)
WorldPacket data( MSG_CHANNEL_UPDATE, 8+4 );
data.append(m_caster->GetPackGUID());
data << time;
data << uint32(time);
((Player*)m_caster)->GetSession()->SendPacket( &data );
}
@ -2934,8 +2927,8 @@ void Spell::SendChannelStart(uint32 duration)
{
WorldPacket data( MSG_CHANNEL_START, (8+4+4) );
data.append(m_caster->GetPackGUID());
data << m_spellInfo->Id;
data << duration;
data << uint32(m_spellInfo->Id);
data << uint32(duration);
((Player*)m_caster)->GetSession()->SendPacket( &data );
}
@ -2961,8 +2954,8 @@ void Spell::SendPlaySpellVisual(uint32 SpellID)
return;
WorldPacket data(SMSG_PLAY_SPELL_VISUAL, 12);
data << m_caster->GetGUID();
data << SpellID;
data << uint64(m_caster->GetGUID());
data << uint32(SpellID); // spell visual id?
((Player*)m_caster)->GetSession()->SendPacket(&data);
}
@ -3963,7 +3956,9 @@ uint8 Spell::CanCast(bool strict)
if(int32(m_targets.getUnitTarget()->getLevel()) > CalculateDamage(i,m_targets.getUnitTarget()))
return SPELL_FAILED_HIGHLEVEL;
};break;
break;
}
case SPELL_AURA_MOUNTED:
{
if (m_caster->IsInWater())
@ -3996,7 +3991,9 @@ uint8 Spell::CanCast(bool strict)
// can be casted at non-friendly unit or own pet/charm
if(m_caster->IsFriendlyTo(m_targets.getUnitTarget()))
return SPELL_FAILED_TARGET_FRIENDLY;
};break;
break;
}
case SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED:
case SPELL_AURA_FLY:
{
@ -4007,7 +4004,9 @@ uint8 Spell::CanCast(bool strict)
GetVirtualMapForMapAndZone(m_caster->GetMapId(),m_caster->GetZoneId()) != 530)
return SPELL_FAILED_NOT_HERE;
}
};break;
break;
}
case SPELL_AURA_PERIODIC_MANA_LEECH:
{
if (!m_targets.getUnitTarget())
@ -4018,9 +4017,11 @@ uint8 Spell::CanCast(bool strict)
if(m_targets.getUnitTarget()->getPowerType()!=POWER_MANA)
return SPELL_FAILED_BAD_TARGETS;
break;
}
default:break;
default:
break;
}
}
@ -4143,7 +4144,7 @@ uint8 Spell::CheckCasterAuras() const
else if(m_caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PACIFIED) && m_spellInfo->PreventionType==SPELL_PREVENTION_TYPE_PACIFY)
prevented_reason = SPELL_FAILED_PACIFIED;
// Attr must make flag drop spell totally immuned from all effects
// Attr must make flag drop spell totally immune from all effects
if(prevented_reason)
{
if(school_immune || mechanic_immune || dispel_immune)

View file

@ -1975,7 +1975,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
( GetSpellProto()->EffectApplyAuraName[0]==1 || GetSpellProto()->EffectApplyAuraName[0]==128 ) ) )
{
// spells with SpellEffect=72 and aura=4: 6196, 6197, 21171, 21425
m_target->SetUInt64Value(PLAYER_FARSIGHT, 0);
((Player*)m_target)->SetFarSight(NULL);
WorldPacket data(SMSG_CLEAR_FAR_SIGHT_IMMEDIATE, 0);
((Player*)m_target)->GetSession()->SendPacket(&data);
return;
@ -2844,7 +2844,7 @@ void Aura::HandleBindSight(bool apply, bool Real)
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
return;
caster->SetUInt64Value(PLAYER_FARSIGHT,apply ? m_target->GetGUID() : 0);
((Player*)caster)->SetFarSight(apply ? m_target->GetGUID() : NULL);
}
void Aura::HandleFarSight(bool apply, bool Real)
@ -2853,7 +2853,7 @@ void Aura::HandleFarSight(bool apply, bool Real)
if(!caster || caster->GetTypeId() != TYPEID_PLAYER)
return;
caster->SetUInt64Value(PLAYER_FARSIGHT,apply ? m_modifier.m_miscvalue : 0);
((Player*)caster)->SetFarSight(apply ? m_target->GetGUID() : NULL);
}
void Aura::HandleAuraTrackCreatures(bool apply, bool Real)
@ -2959,7 +2959,7 @@ void Aura::HandleModPossess(bool apply, bool Real)
}
}
if(caster->GetTypeId() == TYPEID_PLAYER)
caster->SetUInt64Value(PLAYER_FARSIGHT,apply ? m_target->GetGUID() : 0);
((Player*)caster)->SetFarSight(apply ? m_target->GetGUID() : NULL);
}
void Aura::HandleModPossessPet(bool apply, bool Real)
@ -3661,7 +3661,7 @@ void Aura::HandleAuraModIncreaseFlightSpeed(bool apply, bool Real)
m_target->SetUInt32Value(UNIT_FIELD_MOUNTDISPLAYID,16314);
}
m_target->UpdateSpeed(MOVE_FLY, true);
m_target->UpdateSpeed(MOVE_FLIGHT, true);
}
void Aura::HandleAuraModIncreaseSwimSpeed(bool /*apply*/, bool Real)
@ -3681,7 +3681,7 @@ void Aura::HandleAuraModDecreaseSpeed(bool /*apply*/, bool Real)
m_target->UpdateSpeed(MOVE_RUN, true);
m_target->UpdateSpeed(MOVE_SWIM, true);
m_target->UpdateSpeed(MOVE_FLY, true);
m_target->UpdateSpeed(MOVE_FLIGHT, true);
}
void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
@ -3692,7 +3692,7 @@ void Aura::HandleAuraModUseNormalSpeed(bool /*apply*/, bool Real)
m_target->UpdateSpeed(MOVE_RUN, true);
m_target->UpdateSpeed(MOVE_SWIM, true);
m_target->UpdateSpeed(MOVE_FLY, true);
m_target->UpdateSpeed(MOVE_FLIGHT, true);
}
/*********************************************************/
@ -4681,21 +4681,24 @@ void Aura::HandleAuraModIncreaseEnergy(bool apply, bool Real)
if(int32(powerType) != m_modifier.m_miscvalue)
return;
m_target->HandleStatModifier(UnitMods(UNIT_MOD_POWER_START + powerType), TOTAL_VALUE, float(m_modifier.m_amount), apply);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType);
m_target->HandleStatModifier(unitMod, TOTAL_VALUE, float(m_modifier.m_amount), apply);
}
void Aura::HandleAuraModIncreaseEnergyPercent(bool apply, bool Real)
void Aura::HandleAuraModIncreaseEnergyPercent(bool apply, bool /*Real*/)
{
Powers powerType = m_target->getPowerType();
if(int32(powerType) != m_modifier.m_miscvalue)
return;
m_target->HandleStatModifier(UnitMods(UNIT_MOD_POWER_START + powerType), TOTAL_PCT, float(m_modifier.m_amount), apply);
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + powerType);
m_target->HandleStatModifier(unitMod, TOTAL_PCT, float(m_modifier.m_amount), apply);
}
void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool Real)
void Aura::HandleAuraModIncreaseHealthPercent(bool apply, bool /*Real*/)
{
//m_target->ApplyMaxHealthPercentMod(m_modifier.m_amount,apply);
m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_PCT, float(m_modifier.m_amount), apply);
}

View file

@ -887,7 +887,7 @@ void Spell::EffectDummy(uint32 i)
if (!m_caster->HasAuraType(SPELL_AURA_MOUNTED))
return;
float flyspeed = m_caster->GetSpeedRate(MOVE_FLY);
float flyspeed = m_caster->GetSpeedRate(MOVE_FLIGHT);
float speed = m_caster->GetSpeedRate(MOVE_RUN);
m_caster->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
@ -3250,17 +3250,17 @@ void Spell::EffectSummon(uint32 i)
if(duration > 0)
spawnCreature->SetDuration(duration);
spawnCreature->SetUInt64Value(UNIT_FIELD_SUMMONEDBY,m_caster->GetGUID());
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS , 0);
spawnCreature->SetOwnerGUID(m_caster->GetGUID());
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS, 0);
spawnCreature->setPowerType(POWER_MANA);
spawnCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
spawnCreature->SetUInt32Value(UNIT_FIELD_FLAGS,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_0,2048);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP,1000);
spawnCreature->SetUInt64Value(UNIT_FIELD_CREATEDBY, m_caster->GetGUID());
spawnCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, m_caster->getFaction());
spawnCreature->SetUInt32Value(UNIT_FIELD_FLAGS, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
spawnCreature->SetCreatorGUID(m_caster->GetGUID());
spawnCreature->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
spawnCreature->InitStatsForLevel(level);
@ -3522,7 +3522,8 @@ void Spell::EffectAddFarsight(uint32 i)
dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x80000002);
m_caster->AddDynObject(dynObj);
dynObj->GetMap()->Add(dynObj);
m_caster->SetUInt64Value(PLAYER_FARSIGHT, dynObj->GetGUID());
if(m_caster->GetTypeId() == TYPEID_PLAYER)
((Player*)m_caster)->SetFarSight(dynObj->GetGUID());
}
void Spell::EffectSummonWild(uint32 i)
@ -3679,14 +3680,14 @@ void Spell::EffectSummonGuardian(uint32 i)
if(duration > 0)
spawnCreature->SetDuration(duration);
spawnCreature->SetUInt64Value(UNIT_FIELD_SUMMONEDBY,m_caster->GetGUID());
spawnCreature->SetOwnerGUID(m_caster->GetGUID());
spawnCreature->setPowerType(POWER_MANA);
spawnCreature->SetUInt32Value(UNIT_NPC_FLAGS , 0);
spawnCreature->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
spawnCreature->SetUInt32Value(UNIT_FIELD_FLAGS,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
spawnCreature->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP,0);
spawnCreature->SetUInt64Value(UNIT_FIELD_CREATEDBY, m_caster->GetGUID());
spawnCreature->SetCreatorGUID(m_caster->GetGUID());
spawnCreature->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
spawnCreature->InitStatsForLevel(level);
@ -4088,15 +4089,15 @@ void Spell::EffectSummonPet(uint32 i)
NewSummon->GetCharmInfo()->SetReactState(REACT_DEFENSIVE);
}
NewSummon->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, m_caster->GetGUID());
NewSummon->SetUInt64Value(UNIT_FIELD_CREATEDBY, m_caster->GetGUID());
NewSummon->SetUInt32Value(UNIT_NPC_FLAGS , 0);
NewSummon->SetOwnerGUID(m_caster->GetGUID());
NewSummon->SetCreatorGUID(m_caster->GetGUID());
NewSummon->SetUInt32Value(UNIT_NPC_FLAGS, 0);
NewSummon->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, faction);
NewSummon->SetUInt32Value(UNIT_FIELD_BYTES_0,2048);
NewSummon->SetUInt32Value(UNIT_FIELD_BYTES_1,0);
NewSummon->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP,time(NULL));
NewSummon->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE,0);
NewSummon->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP,1000);
NewSummon->SetUInt32Value(UNIT_FIELD_BYTES_0, 2048);
NewSummon->SetUInt32Value(UNIT_FIELD_BYTES_1, 0);
NewSummon->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, time(NULL));
NewSummon->SetUInt32Value(UNIT_FIELD_PETEXPERIENCE, 0);
NewSummon->SetUInt32Value(UNIT_FIELD_PETNEXTLEVELEXP, 1000);
NewSummon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);
NewSummon->GetCharmInfo()->SetPetNumber(pet_number, true);
@ -4105,7 +4106,7 @@ void Spell::EffectSummonPet(uint32 i)
// this enables popup window (pet dismiss, cancel), hunter pet additional flags set later
NewSummon->SetUInt32Value(UNIT_FIELD_FLAGS,UNIT_FLAG_PVP_ATTACKABLE);
NewSummon->InitStatsForLevel( petlevel);
NewSummon->InitStatsForLevel(petlevel);
NewSummon->InitPetCreateSpells();
if(NewSummon->getPetType()==SUMMON_PET)
@ -5703,8 +5704,8 @@ void Spell::EffectSummonCritter(uint32 i)
return;
}
critter->SetUInt64Value(UNIT_FIELD_SUMMONEDBY,m_caster->GetGUID());
critter->SetUInt64Value(UNIT_FIELD_CREATEDBY,m_caster->GetGUID());
critter->SetOwnerGUID(m_caster->GetGUID());
critter->SetCreatorGUID(m_caster->GetGUID());
critter->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,m_caster->getFaction());
critter->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id);

View file

@ -260,7 +260,7 @@ void WorldSession::HandleOpenItemOpcode(WorldPacket& recvPacket)
void WorldSession::HandleGameObjectUseOpcode( WorldPacket & recv_data )
{
CHECK_PACKET_SIZE(recv_data,8);
CHECK_PACKET_SIZE(recv_data, 8);
uint64 guid;

View file

@ -848,6 +848,7 @@ void Pet::UpdateMaxHealth()
void Pet::UpdateMaxPower(Powers power)
{
UnitMods unitMod = UnitMods(UNIT_MOD_POWER_START + power);
float addValue = (power == POWER_MANA) ? GetStat(STAT_INTELLECT) - GetCreateStat(STAT_INTELLECT) : 0.0f;
float value = GetModifierValue(unitMod, BASE_VALUE) + GetCreatePowers(power);

View file

@ -82,7 +82,7 @@ void WorldSession::HandleTaxiQueryAvailableNodesOpcode( WorldPacket & recv_data
Creature *unit = ObjectAccessor::GetNPCIfCanInteractWith(*_player, guid, UNIT_NPC_FLAG_FLIGHTMASTER);
if (!unit)
{
sLog.outDebug( "WORLD: HandleTaxiQueryAvailableNodesOpcode - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
sLog.outDebug( "WORLD: HandleTaxiQueryAvailableNodes - Unit (GUID: %u) not found or you can't interact with him.", uint32(GUID_LOPART(guid)) );
return;
}

View file

@ -128,10 +128,9 @@ void Totem::UnSummon()
void Totem::SetOwner(uint64 guid)
{
SetUInt64Value(UNIT_FIELD_SUMMONEDBY, guid);
SetUInt64Value(UNIT_FIELD_CREATEDBY, guid);
Unit *owner = GetOwner();
if (owner)
SetCreatorGUID(guid);
SetOwnerGUID(guid);
if (Unit *owner = GetOwner())
{
setFaction(owner->getFaction());
SetLevel(owner->getLevel());

View file

@ -62,7 +62,7 @@ inline float Traveller<Creature>::Speed()
if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_WALK_MODE))
return i_traveller.GetSpeed(MOVE_WALK);
else if(i_traveller.HasUnitMovementFlag(MOVEMENTFLAG_FLYING2))
return i_traveller.GetSpeed(MOVE_FLY);
return i_traveller.GetSpeed(MOVE_FLIGHT);
else
return i_traveller.GetSpeed(MOVE_RUN);
}

View file

@ -50,12 +50,12 @@ float baseMoveSpeed[MAX_MOVE_TYPE] =
{
2.5f, // MOVE_WALK
7.0f, // MOVE_RUN
1.25f, // MOVE_WALKBACK
1.25f, // MOVE_RUN_BACK
4.722222f, // MOVE_SWIM
4.5f, // MOVE_SWIMBACK
3.141594f, // MOVE_TURN
7.0f, // MOVE_FLY
4.5f, // MOVE_FLYBACK
4.5f, // MOVE_SWIM_BACK
3.141594f, // MOVE_TURN_RATE
7.0f, // MOVE_FLIGHT
4.5f, // MOVE_FLIGHT_BACK
};
// auraTypes contains attacker auras capable of proc'ing cast auras
@ -1462,9 +1462,8 @@ uint32 Unit::SpellNonMeleeDamageLog(Unit *pVictim, uint32 spellID, uint32 damage
void Unit::HandleEmoteCommand(uint32 anim_id)
{
WorldPacket data( SMSG_EMOTE, 12 );
data << anim_id << GetGUID();
WPAssert(data.size() == 12);
data << uint32(anim_id);
data << uint64(GetGUID());
SendMessageToSet(&data, true);
}
@ -2579,8 +2578,8 @@ float Unit::CalculateLevelPenalty(SpellEntry const* spellProto) const
void Unit::SendAttackStart(Unit* pVictim)
{
WorldPacket data( SMSG_ATTACKSTART, 16 );
data << GetGUID();
data << pVictim->GetGUID();
data << uint64(GetGUID());
data << uint64(pVictim->GetGUID());
SendMessageToSet(&data, true);
DEBUG_LOG( "WORLD: Sent SMSG_ATTACKSTART" );
@ -6901,7 +6900,7 @@ bool Unit::Attack(Unit *victim, bool meleeAttack)
if(GetTypeId()==TYPEID_UNIT)
{
WorldPacket data(SMSG_AI_REACTION, 12);
data << GetGUID();
data << uint64(GetGUID());
data << uint32(AI_REACTION_AGGRO); // Aggro sound
((WorldObject*)this)->SendMessageToSet(&data, true);
@ -7117,17 +7116,17 @@ Unit* Unit::GetCharm() const
void Unit::SetPet(Pet* pet)
{
SetUInt64Value(UNIT_FIELD_SUMMON,pet ? pet->GetGUID() : 0);
SetUInt64Value(UNIT_FIELD_SUMMON, pet ? pet->GetGUID() : 0);
// FIXME: hack, speed must be set only at follow
if(pet)
for(int i = 0; i < MAX_MOVE_TYPE; ++i)
pet->SetSpeed(UnitMoveType(i),m_speed_rate[i],true);
pet->SetSpeed(UnitMoveType(i), m_speed_rate[i], true);
}
void Unit::SetCharm(Unit* charmed)
void Unit::SetCharm(Unit* pet)
{
SetUInt64Value(UNIT_FIELD_CHARM,charmed ? charmed->GetGUID() : 0);
SetUInt64Value(UNIT_FIELD_CHARM, pet ? pet->GetGUID() : 0);
}
void Unit::UnsummonAllTotems()
@ -7164,7 +7163,6 @@ void Unit::SendEnergizeSpellLog(Unit *pVictim, uint32 SpellID, uint32 Damage, Po
data << uint32(SpellID);
data << uint32(powertype);
data << uint32(Damage);
//data << uint8(critical ? 1 : 0); // removed in 2.4.0
SendMessageToSet(&data, true);
}
@ -7621,7 +7619,7 @@ int32 Unit::SpellBaseDamageBonusForVictim(SpellSchoolMask schoolMask, Unit *pVic
bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolMask schoolMask, WeaponAttackType attackType)
{
// not criting spell
// not critting spell
if((spellProto->AttributesEx2 & SPELL_ATTR_EX2_CANT_CRIT))
return false;
@ -8809,16 +8807,16 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
}
break;
}
case MOVE_WALKBACK:
case MOVE_RUN_BACK:
return;
case MOVE_SWIM:
{
main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_SWIM_SPEED);
break;
}
case MOVE_SWIMBACK:
case MOVE_SWIM_BACK:
return;
case MOVE_FLY:
case MOVE_FLIGHT:
{
if (IsMounted()) // Use on mount auras
main_speed_mod = GetMaxPositiveAuraModifier(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED);
@ -8828,7 +8826,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
non_stack_bonus = (100.0 + GetMaxPositiveAuraModifier(SPELL_AURA_MOD_FLIGHT_SPEED_NOT_STACK))/100.0f;
break;
}
case MOVE_FLYBACK:
case MOVE_FLIGHT_BACK:
return;
default:
sLog.outError("Unit::UpdateSpeed: Unsupported move type (%d)", mtype);
@ -8843,7 +8841,7 @@ void Unit::UpdateSpeed(UnitMoveType mtype, bool forced)
{
case MOVE_RUN:
case MOVE_SWIM:
case MOVE_FLY:
case MOVE_FLIGHT:
{
// Normalize speed by 191 aura SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED if need
// TODO: possible affect only on MOVE_RUN
@ -8900,22 +8898,22 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
case MOVE_RUN:
data.Initialize(MSG_MOVE_SET_RUN_SPEED, 8+4+1+4+4+4+4+4+4+4);
break;
case MOVE_WALKBACK:
case MOVE_RUN_BACK:
data.Initialize(MSG_MOVE_SET_RUN_BACK_SPEED, 8+4+1+4+4+4+4+4+4+4);
break;
case MOVE_SWIM:
data.Initialize(MSG_MOVE_SET_SWIM_SPEED, 8+4+1+4+4+4+4+4+4+4);
break;
case MOVE_SWIMBACK:
case MOVE_SWIM_BACK:
data.Initialize(MSG_MOVE_SET_SWIM_BACK_SPEED, 8+4+1+4+4+4+4+4+4+4);
break;
case MOVE_TURN:
case MOVE_TURN_RATE:
data.Initialize(MSG_MOVE_SET_TURN_RATE, 8+4+1+4+4+4+4+4+4+4);
break;
case MOVE_FLY:
case MOVE_FLIGHT:
data.Initialize(MSG_MOVE_SET_FLIGHT_SPEED, 8+4+1+4+4+4+4+4+4+4);
break;
case MOVE_FLYBACK:
case MOVE_FLIGHT_BACK:
data.Initialize(MSG_MOVE_SET_FLIGHT_BACK_SPEED, 8+4+1+4+4+4+4+4+4+4);
break;
default:
@ -8948,22 +8946,22 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
case MOVE_RUN:
data.Initialize(SMSG_FORCE_RUN_SPEED_CHANGE, 17);
break;
case MOVE_WALKBACK:
case MOVE_RUN_BACK:
data.Initialize(SMSG_FORCE_RUN_BACK_SPEED_CHANGE, 16);
break;
case MOVE_SWIM:
data.Initialize(SMSG_FORCE_SWIM_SPEED_CHANGE, 16);
break;
case MOVE_SWIMBACK:
case MOVE_SWIM_BACK:
data.Initialize(SMSG_FORCE_SWIM_BACK_SPEED_CHANGE, 16);
break;
case MOVE_TURN:
case MOVE_TURN_RATE:
data.Initialize(SMSG_FORCE_TURN_RATE_CHANGE, 16);
break;
case MOVE_FLY:
case MOVE_FLIGHT:
data.Initialize(SMSG_FORCE_FLIGHT_SPEED_CHANGE, 16);
break;
case MOVE_FLYBACK:
case MOVE_FLIGHT_BACK:
data.Initialize(SMSG_FORCE_FLIGHT_BACK_SPEED_CHANGE, 16);
break;
default:
@ -8971,7 +8969,7 @@ void Unit::SetSpeed(UnitMoveType mtype, float rate, bool forced)
return;
}
data.append(GetPackGUID());
data << (uint32)0;
data << (uint32)0; // moveEvent, NUM_PMOVE_EVTS = 0x39
if (mtype == MOVE_RUN)
data << uint8(0); // new 2.1.0
data << float(GetSpeed(mtype));
@ -10753,9 +10751,9 @@ Pet* Unit::CreateTamedPetFrom(Creature* creatureTarget,uint32 spell_id)
return NULL;
}
pet->SetUInt64Value(UNIT_FIELD_SUMMONEDBY, GetGUID());
pet->SetUInt64Value(UNIT_FIELD_CREATEDBY, GetGUID());
pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE,getFaction());
pet->SetOwnerGUID(GetGUID());
pet->SetCreatorGUID(GetGUID());
pet->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, getFaction());
pet->SetUInt32Value(UNIT_CREATED_BY_SPELL, spell_id);
if(!pet->InitStatsForLevel(creatureTarget->getLevel()))

View file

@ -366,14 +366,14 @@ enum UnitState
enum UnitMoveType
{
MOVE_WALK = 0,
MOVE_RUN = 1,
MOVE_WALKBACK = 2,
MOVE_SWIM = 3,
MOVE_SWIMBACK = 4,
MOVE_TURN = 5,
MOVE_FLY = 6,
MOVE_FLYBACK = 7
MOVE_WALK = 0,
MOVE_RUN = 1,
MOVE_RUN_BACK = 2,
MOVE_SWIM = 3,
MOVE_SWIM_BACK = 4,
MOVE_TURN_RATE = 5,
MOVE_FLIGHT = 6,
MOVE_FLIGHT_BACK = 7,
};
#define MAX_MOVE_TYPE 8
@ -948,11 +948,14 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
DeathState getDeathState() { return m_deathState; };
virtual void setDeathState(DeathState s); // overwrited in Creature/Player/Pet
uint64 const& GetOwnerGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMONEDBY); }
uint64 GetOwnerGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMONEDBY); }
void SetOwnerGUID(uint64 owner) { SetUInt64Value(UNIT_FIELD_SUMMONEDBY, owner); }
uint64 GetCreatorGUID() const { return GetUInt64Value(UNIT_FIELD_CREATEDBY); }
void SetCreatorGUID(uint64 creator) { SetUInt64Value(UNIT_FIELD_CREATEDBY, creator); }
uint64 GetPetGUID() const { return GetUInt64Value(UNIT_FIELD_SUMMON); }
uint64 GetCharmerGUID() const { return GetUInt64Value(UNIT_FIELD_CHARMEDBY); }
uint64 GetCharmGUID() const { return GetUInt64Value(UNIT_FIELD_CHARM); }
void SetCharmerGUID(uint64 owner) { SetUInt64Value(UNIT_FIELD_CHARMEDBY, owner); }
uint64 GetCharmGUID() const { return GetUInt64Value(UNIT_FIELD_CHARM); }
uint64 GetCharmerOrOwnerGUID() const { return GetCharmerGUID() ? GetCharmerGUID() : GetOwnerGUID(); }
uint64 GetCharmerOrOwnerOrOwnGUID() const
@ -981,6 +984,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
void SetPet(Pet* pet);
void SetCharm(Unit* pet);
bool isCharmed() const { return GetCharmerGUID() != 0; }
CharmInfo* GetCharmInfo() { return m_charmInfo; }
@ -1116,7 +1120,7 @@ class MANGOS_DLL_SPEC Unit : public WorldObject
AuraList const& GetSingleCastAuras() const { return m_scAuras; }
SpellImmuneList m_spellImmune[MAX_SPELL_IMMUNITY];
// Threat related methodes
// Threat related methods
bool CanHaveThreatList() const;
void AddThreat(Unit* pVictim, float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL, SpellEntry const *threatSpell = NULL);
float ApplyTotalThreatModifier(float threat, SpellSchoolMask schoolMask = SPELL_SCHOOL_MASK_NORMAL);

View file

@ -42,8 +42,7 @@ alter table creature_movement add `wpguid` int(11) default '0';
#include <cassert>
//-----------------------------------------------//
void
WaypointMovementGenerator<Creature>::LoadPath(Creature &c)
void WaypointMovementGenerator<Creature>::LoadPath(Creature &c)
{
sLog.outDetail("LoadPath: loading waypoint path for creature %d,%d", c.GetGUIDLow(), c.GetDBTableGUIDLow());
@ -60,26 +59,23 @@ WaypointMovementGenerator<Creature>::LoadPath(Creature &c)
for(uint32 i = 0; i < node_count-1; i++)
i_hasDone[i] = false;
// to prevent a misbehaviour inside "update"
// to prevent a misbehavior inside "update"
// update is always called with the next wp - but the wpSys needs the current
// so when the routine is called the first time, wpSys gets the last waypoint
// and this prevents the system from performing text/emote, etc
i_hasDone[node_count - 1] = true;
}
void
WaypointMovementGenerator<Creature>::ClearWaypoints()
void WaypointMovementGenerator<Creature>::ClearWaypoints()
{
i_path = NULL;
}
void
WaypointMovementGenerator<Creature>::Initialize()
void WaypointMovementGenerator<Creature>::Initialize()
{
}
bool
WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff)
bool WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff)
{
if(!&creature)
return true;
@ -104,7 +100,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &di
i_nextMoveTime.Update(diff);
i_destinationHolder.UpdateTraveller(traveller, diff, false, true);
// creature has been stoped in middle of the waypoint segment
// creature has been stopped in middle of the waypoint segment
if (!i_destinationHolder.HasArrived() && creature.IsStopped())
{
if( i_nextMoveTime.Passed()) // Timer has elapsed, meaning this part controlled it
@ -214,14 +210,12 @@ void WaypointMovementGenerator<Creature>::MovementInform(Creature &unit)
}
//----------------------------------------------------//
void
FlightPathMovementGenerator::LoadPath(Player &)
void FlightPathMovementGenerator::LoadPath(Player &)
{
objmgr.GetTaxiPathNodes(i_pathId, i_path,i_mapIds);
}
uint32
FlightPathMovementGenerator::GetPathAtMapEnd() const
uint32 FlightPathMovementGenerator::GetPathAtMapEnd() const
{
if(i_currentNode >= i_mapIds.size())
return i_mapIds.size();
@ -236,8 +230,7 @@ FlightPathMovementGenerator::GetPathAtMapEnd() const
return i_mapIds.size();
}
void
FlightPathMovementGenerator::Initialize(Player &player)
void FlightPathMovementGenerator::Initialize(Player &player)
{
player.getHostilRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
@ -252,7 +245,6 @@ FlightPathMovementGenerator::Initialize(Player &player)
void FlightPathMovementGenerator::Finalize(Player & player)
{
float x, y, z;
i_destinationHolder.GetLocationNow(player.GetMapId(), x, y, z);
player.SetPosition(x, y, z, player.GetOrientation());
@ -272,8 +264,7 @@ void FlightPathMovementGenerator::Finalize(Player & player)
}
}
bool
FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
bool FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
{
if( MovementInProgress() )
{
@ -308,8 +299,7 @@ FlightPathMovementGenerator::Update(Player &player, const uint32 &diff)
return false;
}
void
FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
void FlightPathMovementGenerator::SetCurrentNodeAfterTeleport()
{
if(i_mapIds.empty())
return;

View file

@ -480,38 +480,38 @@ void WorldSession::Handle_NULL( WorldPacket& recvPacket )
void WorldSession::Handle_EarlyProccess( WorldPacket& recvPacket )
{
sLog.outError( "SESSION: received opcode %s (0x%.4X) that must be proccessed in WorldSocket::OnRead",
sLog.outError( "SESSION: received opcode %s (0x%.4X) that must be processed in WorldSocket::OnRead",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_ServerSide( WorldPacket& recvPacket )
{
sLog.outError( "SESSION: received sever-side opcode %s (0x%.4X)",
sLog.outError( "SESSION: received server-side opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::Handle_Depricated( WorldPacket& recvPacket )
void WorldSession::Handle_Deprecated( WorldPacket& recvPacket )
{
sLog.outError( "SESSION: received depricated opcode %s (0x%.4X)",
sLog.outError( "SESSION: received deprecated opcode %s (0x%.4X)",
LookupOpcodeName(recvPacket.GetOpcode()),
recvPacket.GetOpcode());
}
void WorldSession::SendAuthWaitQue(uint32 position)
{
if(position == 0)
{
WorldPacket packet( SMSG_AUTH_RESPONSE, 1 );
packet << uint8( AUTH_OK );
SendPacket(&packet);
}
else
{
WorldPacket packet( SMSG_AUTH_RESPONSE, 5 );
packet << uint8( AUTH_WAIT_QUEUE );
packet << uint32 (position);
SendPacket(&packet);
}
}
{
if(position == 0)
{
WorldPacket packet( SMSG_AUTH_RESPONSE, 1 );
packet << uint8( AUTH_OK );
SendPacket(&packet);
}
else
{
WorldPacket packet( SMSG_AUTH_RESPONSE, 5 );
packet << uint8( AUTH_WAIT_QUEUE );
packet << uint32 (position);
SendPacket(&packet);
}
}

View file

@ -209,7 +209,7 @@ class MANGOS_DLL_SPEC WorldSession
void Handle_NULL(WorldPacket& recvPacket); // not used
void Handle_EarlyProccess( WorldPacket& recvPacket);// just mark packets processed in WorldSocket::OnRead
void Handle_ServerSide(WorldPacket& recvPacket); // sever side only, can't be accepted from client
void Handle_Depricated(WorldPacket& recvPacket); // never used anymore by client
void Handle_Deprecated(WorldPacket& recvPacket); // never used anymore by client
void HandleCharEnumOpcode(WorldPacket& recvPacket);
void HandleCharDeleteOpcode(WorldPacket& recvPacket);

View file

@ -712,7 +712,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
Field* fields = result->Fetch ();
expansion = fields[8].GetUInt8 () && sWorld.getConfig (CONFIG_EXPANSION) > 0;
expansion = ((sWorld.getConfig(CONFIG_EXPANSION) > fields[8].GetUInt8()) ? fields[8].GetUInt8() : sWorld.getConfig(CONFIG_EXPANSION));
N.SetHexStr ("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7");
g.SetDword (7);
@ -734,8 +734,8 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
x.SetBinary (sha1.GetDigest (), sha1.GetLength ());
v = g.ModExp (x, N);
const char* sStr = s.AsHexStr (); //Must be freed by OPENSSL_free()
const char* vStr = v.AsHexStr (); //Must be freed by OPENSSL_free()
const char* sStr = s.AsHexStr (); //Must be freed by OPENSSL_free()
const char* vStr = v.AsHexStr (); //Must be freed by OPENSSL_free()
const char* vold = fields[6].GetString ();
DEBUG_LOG ("WorldSocket::HandleAuthSession: (s,v) check s: %s v_old: %s v_new: %s",
@ -825,7 +825,7 @@ int WorldSocket::HandleAuthSession (WorldPacket& recvPacket)
SendPacket (packet);
sLog.outBasic ("WorldSocket::HandleAuthSession: User tryes to login but his security level is not enough");
sLog.outBasic ("WorldSocket::HandleAuthSession: User tries to login but his security level is not enough");
return -1;
}
@ -940,7 +940,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
ACE_GUARD_RETURN (LockType, Guard, m_SessionLock, -1);
if (m_Session)
m_Session->SetLatency (latency);
m_Session->SetLatency (latency);
else
{
sLog.outError ("WorldSocket::HandlePing: peer sent CMSG_PING, "

View file

@ -31,6 +31,7 @@
#include "Language.h"
#include "MapManager.h"
#include <fstream>
#include "ObjectMgr.h"
bool ChatHandler::HandleDebugInArcCommand(const char* /*args*/)
{
@ -59,8 +60,8 @@ bool ChatHandler::HandleDebugSpellFailCommand(const char* args)
uint8 failnum = (uint8)atoi(px);
WorldPacket data(SMSG_CAST_FAILED, 5);
data << (uint32)133;
data << failnum;
data << uint32(133);
data << uint8(failnum);
m_session->SendPacket(&data);
return true;
@ -145,11 +146,14 @@ bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
std::string type;
ifs >> type;
if(type == "")
break;
if(type == "uint8")
{
uint8 val1;
uint16 val1;
ifs >> val1;
data << val1;
data << uint8(val1);
}
else if(type == "uint16")
{
@ -187,7 +191,8 @@ bool ChatHandler::HandleSendOpcodeCommand(const char* /*args*/)
}
else
{
sLog.outDebug("Sending opcode: unknown type %s", type.c_str());
sLog.outDebug("Sending opcode: unknown type '%s'", type.c_str());
break;
}
}
ifs.close();

View file

@ -50,7 +50,7 @@ class RASocket: public TcpSocket
bool bLog;
bool bSecure; //kick on wrong pass, non exist. user, user with no priv
//will protect from DOS, bruteforce attacks
//some 'smart' protection must be added for more scurity
//some 'smart' protection must be added for more security
uint8 iMinLevel;
enum
{

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "6888"
#define REVISION_NR "6889"
#endif // __REVISION_NR_H__