Skip to content

Commit

Permalink
* Last fixes for this core. Next Commit coming with the new core, Fix…
Browse files Browse the repository at this point in the history
…ed all compile warnings(X64) & errors.
  • Loading branch information
zed committed Dec 3, 2009
1 parent 5968fed commit e190bf3
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/ascent-logonserver/AuthSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ void AuthSocket::HandleReconnectChallenge()
rs.SetRand(16*8);
pkt.append(rs.AsByteBuffer()); // 16 bytes random
pkt << (uint64) 0x00 << (uint64) 0x00; // 16 bytes zeros
Send(pkt.contents(), pkt.size());
Send(pkt.contents(), uint32(pkt.size()));
}

void AuthSocket::HandleReconnectProof()
Expand Down
4 changes: 2 additions & 2 deletions src/ascent-shared/Auth/WowCrypt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ void WowCrypt::Init(uint8 *K)
_initialized = true;
}

void WowCrypt::DecryptRecv(uint8 *data, size_t len)
void WowCrypt::DecryptRecv(uint8 *data, unsigned int len)
{
if (!_initialized)
return;

_Decrypt.Process((uint8*)data, (uint8*)data, len);
}

void WowCrypt::EncryptSend(uint8 *data, size_t len)
void WowCrypt::EncryptSend(uint8 *data, unsigned int len)
{
if (!_initialized)
return;
Expand Down
4 changes: 2 additions & 2 deletions src/ascent-shared/Auth/WowCrypt.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ class WowCrypt
~WowCrypt();

void Init(uint8 *K);
void DecryptRecv(uint8 * data, size_t len);
void EncryptSend(uint8 * data, size_t len);
void DecryptRecv(uint8 * data, unsigned int len);
void EncryptSend(uint8 * data, unsigned int len);

bool IsInitialized() { return _initialized; }

Expand Down
4 changes: 2 additions & 2 deletions src/ascent-world/AIInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1851,7 +1851,7 @@ void AIInterface::SendMoveToPacket(float toX, float toY, float toZ, float toO, u
for(unordered_set<PlayerPointer >::iterator itr = m_Unit->GetInRangePlayerSetBegin(); itr != m_Unit->GetInRangePlayerSetEnd(); ++itr)
{
if( (*itr)->GetPositionNC().Distance2DSq( m_Unit->GetPosition() ) >= World::m_movementCompressThresholdCreatures )
(*itr)->AppendMovementData( SMSG_MONSTER_MOVE, data.GetSize(), (const uint8*)data.GetBufferPointer() );
(*itr)->AppendMovementData( SMSG_MONSTER_MOVE, uint32(data.GetSize()), (const uint8*)data.GetBufferPointer() );
else
(*itr)->GetSession()->SendPacket(&data);
}
Expand Down Expand Up @@ -2385,7 +2385,7 @@ WayPoint* AIInterface::getWayPoint(uint32 wpid)
return NULL;

//make sure wpid is valid, return 1st/last if out of boundaries.
wpid = ( wpid > m_waypoints->size() ? m_waypoints->size() : ( !wpid? 1 : wpid ));
wpid = uint32( wpid > m_waypoints->size() ? m_waypoints->size() : ( !wpid? 1 : wpid ));

return m_waypoints->at(wpid-1);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ascent-world/ChatHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ void WorldSession::HandleMessagechatOpcode( WorldPacket & recv_data )
if( msg.length() >= sWorld.flood_caps_min_len )
{
uint32 fc = 0;
uint32 slen = msg.length();
uint32 slen = uint32(msg.length());
uint32 clen = 0;
for(; fc < slen; ++fc)
{
Expand Down
2 changes: 1 addition & 1 deletion src/ascent-world/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ INCLUDES += -I$(srcdir)/../ascent-shared

bin_PROGRAMS = ascent-world

hearthstone_world_SOURCES = \
ascent_world_SOURCES = \
CollideInterface.cpp \
CollideInterface.h \
VoiceChatClientSocket.cpp \
Expand Down
10 changes: 5 additions & 5 deletions src/ascent-world/Player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2475,7 +2475,7 @@ void Player::_SaveSkillsToDB(QueryBuffer * buf)

std::stringstream ss;
ss << "INSERT INTO playerskills (Player_Guid, skill_id, type, currentlvl, maxlvl ) VALUES ";
uint32 iI = m_skills.size()-1;
uint32 iI = uint32(m_skills.size())-1;
for(SkillMap::iterator itr = m_skills.begin(); itr != m_skills.end() ; ++itr)
{
if(itr->first)
Expand Down Expand Up @@ -3264,7 +3264,7 @@ void Player::LoadFromDBProc(QueryResultVector & results)
m_finishedQuests.insert(atol(start));
start = end +1;
}
GetAchievementInterface()->HandleAchievementCriteriaQuestCount( m_finishedQuests.size() );
GetAchievementInterface()->HandleAchievementCriteriaQuestCount( uint32(m_finishedQuests.size()));

DailyMutex.Acquire();
start = (char*)get_next_field.GetString();
Expand All @@ -3273,7 +3273,7 @@ void Player::LoadFromDBProc(QueryResultVector & results)
end = strchr(start,',');
if(!end)break;
*end=0;
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1 + m_finishedDailyQuests.size(), atol(start));
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1 + uint32(m_finishedDailyQuests.size()), atol(start));
m_finishedDailyQuests.insert(atol(start));
start = end +1;
}
Expand Down Expand Up @@ -4745,7 +4745,7 @@ int32 Player::GetOpenQuestSlot()
void Player::AddToFinishedQuests(uint32 quest_id)
{
m_finishedQuests.insert(quest_id);
GetAchievementInterface()->HandleAchievementCriteriaQuestCount( m_finishedQuests.size() );
GetAchievementInterface()->HandleAchievementCriteriaQuestCount( uint32(m_finishedQuests.size()));
}

bool Player::HasFinishedQuest(uint32 quest_id)
Expand All @@ -4759,7 +4759,7 @@ void Player::AddToFinishedDailyQuests(uint32 quest_id)
return;

DailyMutex.Acquire();
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1 + m_finishedDailyQuests.size(), quest_id);
SetUInt32Value(PLAYER_FIELD_DAILY_QUESTS_1 + uint32(m_finishedDailyQuests.size()), quest_id);
m_finishedDailyQuests.insert(quest_id);
DailyMutex.Release();
}
Expand Down
4 changes: 2 additions & 2 deletions src/ascent-world/SpellAuras.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1377,7 +1377,7 @@ void Aura::EventRelocateRandomTarget()
if( !enemies.size() )
return;

uint32 random = RandomUInt(enemies.size() - 1);
uint32 random = RandomUInt(uint32(enemies.size()) - 1);
set<UnitPointer >::iterator it2 = enemies.begin();
while( random-- )
it2++;
Expand Down Expand Up @@ -5300,7 +5300,7 @@ void Aura::EventPeriodicLeech(uint32 amount)
}
}

uint32 siphonbonus = auras.size() * m_caster->m_soulSiphon.amt;
uint32 siphonbonus = uint32(auras.size()) * m_caster->m_soulSiphon.amt;
if( siphonbonus > m_caster->m_soulSiphon.max )
siphonbonus = m_caster->m_soulSiphon.max;

Expand Down
2 changes: 1 addition & 1 deletion src/ascent-world/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,7 @@ void Spell::SpellEffectDummy(uint32 i) // Dummy(Scripted events)
{
PlayerPointer tgt;
if( possible_targets.size() > 1 )
tgt = possible_targets[RandomUInt(possible_targets.size()-1)];
tgt = possible_targets[RandomUInt(uint32(possible_targets.size())-1)];
else
tgt = possible_targets[0];

Expand Down
2 changes: 1 addition & 1 deletion src/ascent-world/SpellFixes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void GenerateNameHashesFile()
{
const uint32 fieldSize = 81;
const char* prefix = "SPELL_HASH_";
uint32 prefixLen = strlen(prefix);
uint32 prefixLen = uint32(strlen(prefix));
DBCFile dbc;

if( !dbc.open( "DBC/Spell.dbc" ) )
Expand Down
12 changes: 6 additions & 6 deletions src/scripts/projects/ExtraScripts2008.vcproj
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="2"
AdditionalIncludeDirectories="..\..\hearthstone-shared;..\..\hearthstone-world;..\..\..\dep\include;..\..\..\dep\src"
AdditionalIncludeDirectories="..\..\ascent-shared;..\..\ascent-world;..\..\..\dep\include;..\..\..\dep\src"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SCRIPTLIB"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand All @@ -67,7 +67,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="hearthstone-world.lib"
AdditionalDependencies="ascent-world.lib"
OutputFile="../../../bin/debug/script_bin/WorldPvPScripts.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\..\bin\debug"
Expand Down Expand Up @@ -129,7 +129,7 @@
Name="VCCLCompilerTool"
Optimization="0"
InlineFunctionExpansion="2"
AdditionalIncludeDirectories="..\..\hearthstone-shared;..\..\hearthstone-world;..\..\..\dep\include;..\..\..\dep\src"
AdditionalIncludeDirectories="..\..\ascent-shared;..\..\ascent-world;..\..\..\dep\include;..\..\..\dep\src"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;SCRIPTLIB;X64;_CRT_SECURE_NO_WARNINGS;_CRT_NONSTDC_NO_WARNINGS"
MinimalRebuild="true"
BasicRuntimeChecks="3"
Expand All @@ -150,7 +150,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="hearthstone-world.lib"
AdditionalDependencies="ascent-world.lib"
OutputFile="../../../bin/debug_x64/script_bin/WorldPvPScripts.dll"
LinkIncremental="2"
AdditionalLibraryDirectories="..\..\..\bin\debug_x64"
Expand Down Expand Up @@ -216,7 +216,7 @@
FavorSizeOrSpeed="1"
OmitFramePointers="true"
WholeProgramOptimization="true"
AdditionalIncludeDirectories="..\..\hearthstone-shared;..\..\hearthstone-world;..\..\..\dep\include;..\..\..\dep\src"
AdditionalIncludeDirectories="..\..\ascent-shared;..\..\ascent-world;..\..\..\dep\include;..\..\..\dep\src"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;SCRIPTLIB"
RuntimeLibrary="2"
BufferSecurityCheck="false"
Expand All @@ -237,7 +237,7 @@
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="hearthstone-world.lib"
AdditionalDependencies="ascent-world.lib"
OutputFile="../../../bin/release/script_bin/WorldPvPScripts.dll"
LinkIncremental="1"
AdditionalLibraryDirectories="..\..\..\bin\release"
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/src/ExtraScripts/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
INCLUDES += -I$(srcdir) -I$(srcdir)/../../../../dep/include -I$(srcdir)/../../../hearthstone-shared
INCLUDES += -I$(srcdir)/../../../hearthstone-world -I$(srcdir)/../../../../dep/src
INCLUDES += -I$(srcdir) -I$(srcdir)/../../../../dep/include -I$(srcdir)/../../../ascent-shared
INCLUDES += -I$(srcdir)/../../../ascent-world -I$(srcdir)/../../../../dep/src

AM_CXXFLAGS = -DSCRIPTLIB

Expand Down
4 changes: 2 additions & 2 deletions win/VC90/ascent-logonserver.vcproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Version="9,00"
Name="ascent-logonserver"
ProjectGUID="{6E15F06D-5546-474D-BB42-39848DEF77E0}"
RootNamespace="logonserver"
Expand Down Expand Up @@ -361,7 +361,7 @@
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
OptimizeForWindows98="1"
OptimizeForWindows98="0"
RandomizedBaseAddress="1"
DataExecutionPrevention="0"
TargetMachine="17"
Expand Down

0 comments on commit e190bf3

Please sign in to comment.