*Fix build.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-01-05 14:53:33 -06:00
parent f764602944
commit d86b625237
8 changed files with 341 additions and 8 deletions
+63
View File
@@ -0,0 +1,63 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Player.h"
#include "BattleGround.h"
#include "BattleGroundDS.h"
BattleGroundDS::BattleGroundDS()
{
}
BattleGroundDS::~BattleGroundDS()
{
}
void BattleGroundDS::Update(time_t diff)
{
BattleGround::Update(diff);
}
void BattleGroundDS::AddPlayer(Player *plr)
{
BattleGround::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
BattleGroundDSScore* sc = new BattleGroundDSScore;
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattleGroundDS::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
{
}
void BattleGroundDS::HandleKillPlayer(Player* player, Player* killer)
{
BattleGround::HandleKillPlayer(player, killer);
}
void BattleGroundDS::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/)
{
}
bool BattleGroundDS::SetupBattleGround()
{
return true;
}
+47
View File
@@ -0,0 +1,47 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BATTLEGROUNDDS_H
#define __BATTLEGROUNDDS_H
class BattleGround;
class BattleGroundDSScore : public BattleGroundScore
{
public:
BattleGroundDSScore() {};
virtual ~BattleGroundDSScore() {};
//TODO fix me
};
class BattleGroundDS : public BattleGround
{
friend class BattleGroundMgr;
public:
BattleGroundDS();
~BattleGroundDS();
void Update(time_t diff);
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
void RemovePlayer(Player *plr, uint64 guid);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
bool SetupBattleGround();
void HandleKillPlayer(Player* player, Player *killer);
};
#endif
+63
View File
@@ -0,0 +1,63 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "Player.h"
#include "BattleGround.h"
#include "BattleGroundRV.h"
BattleGroundRV::BattleGroundRV()
{
}
BattleGroundRV::~BattleGroundRV()
{
}
void BattleGroundRV::Update(time_t diff)
{
BattleGround::Update(diff);
}
void BattleGroundRV::AddPlayer(Player *plr)
{
BattleGround::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
BattleGroundRVScore* sc = new BattleGroundRVScore;
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattleGroundRV::RemovePlayer(Player * /*plr*/, uint64 /*guid*/)
{
}
void BattleGroundRV::HandleKillPlayer(Player* player, Player* killer)
{
BattleGround::HandleKillPlayer(player, killer);
}
void BattleGroundRV::HandleAreaTrigger(Player * /*Source*/, uint32 /*Trigger*/)
{
}
bool BattleGroundRV::SetupBattleGround()
{
return true;
}
+47
View File
@@ -0,0 +1,47 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BATTLEGROUNDRV_H
#define __BATTLEGROUNDRV_H
class BattleGround;
class BattleGroundRVScore : public BattleGroundScore
{
public:
BattleGroundRVScore() {};
virtual ~BattleGroundRVScore() {};
//TODO fix me
};
class BattleGroundRV : public BattleGround
{
friend class BattleGroundMgr;
public:
BattleGroundRV();
~BattleGroundRV();
void Update(time_t diff);
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
void RemovePlayer(Player *plr, uint64 guid);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
bool SetupBattleGround();
void HandleKillPlayer(Player* player, Player *killer);
};
#endif
+67
View File
@@ -0,0 +1,67 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include "BattleGround.h"
#include "BattleGroundSA.h"
BattleGroundSA::BattleGroundSA()
{
}
BattleGroundSA::~BattleGroundSA()
{
}
void BattleGroundSA::Update(time_t diff)
{
BattleGround::Update(diff);
}
void BattleGroundSA::AddPlayer(Player *plr)
{
BattleGround::AddPlayer(plr);
//create score and add it to map, default values are set in constructor
BattleGroundSAScore* sc = new BattleGroundSAScore;
m_PlayerScores[plr->GetGUID()] = sc;
}
void BattleGroundSA::RemovePlayer(Player* /*plr*/,uint64 /*guid*/)
{
}
void BattleGroundSA::HandleAreaTrigger(Player *Source, uint32 Trigger)
{
// this is wrong way to implement these things. On official it done by gameobject spell cast.
if(GetStatus() != STATUS_IN_PROGRESS)
return;
}
void BattleGroundSA::UpdatePlayerScore(Player* Source, uint32 type, uint32 value)
{
std::map<uint64, BattleGroundScore*>::iterator itr = m_PlayerScores.find(Source->GetGUID());
if(itr == m_PlayerScores.end()) // player not found...
return;
BattleGround::UpdatePlayerScore(Source,type,value);
}
+52
View File
@@ -0,0 +1,52 @@
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef __BATTLEGROUNDSA_H
#define __BATTLEGROUNDSA_H
class BattleGround;
class BattleGroundSAScore : public BattleGroundScore
{
public:
BattleGroundSAScore() {};
virtual ~BattleGroundSAScore() {};
};
class BattleGroundSA : public BattleGround
{
friend class BattleGroundMgr;
public:
BattleGroundSA();
~BattleGroundSA();
void Update(time_t diff);
/* inherited from BattlegroundClass */
virtual void AddPlayer(Player *plr);
void RemovePlayer(Player *plr,uint64 guid);
void HandleAreaTrigger(Player *Source, uint32 Trigger);
//bool SetupBattleGround();
/* Scorekeeping */
void UpdatePlayerScore(Player *Source, uint32 type, uint32 value);
private:
};
#endif
-6
View File
@@ -7702,12 +7702,6 @@ void Player::SendInitWorldStates(bool forceZone, uint32 forceZoneId)
case 1377: case 1377:
NumberOfFields = 15; NumberOfFields = 15;
break; break;
case 139:
NumberOfFields = 39;
break;
case 1377:
NumberOfFields = 13;
break;
case 2597: case 2597:
NumberOfFields = 83; NumberOfFields = 83;
break; break;
+2 -2
View File
@@ -1072,7 +1072,7 @@ int WorldSocket::HandlePing (WorldPacket& recvPacket)
return SendPacket (packet); return SendPacket (packet);
} }
int WorldSocket::iSendPacket (const WorldPacket& pct) /*int WorldSocket::iSendPacket (const WorldPacket& pct)
{ {
ServerPktHeader header(pct.size()+2, pct.GetOpcode()); ServerPktHeader header(pct.size()+2, pct.GetOpcode());
if (m_OutBuffer->space () < pct.size () + header.getHeaderLength()) if (m_OutBuffer->space () < pct.size () + header.getHeaderLength())
@@ -1120,4 +1120,4 @@ bool WorldSocket::iFlushPacketQueue ()
} }
return haveone; return haveone;
} }*/