Files
TCPlayerbotCore/src/game/TemporarySummon.h
T

67 lines
2.1 KiB
C++
Raw Normal View History

2008-10-02 16:23:55 -05:00
/*
* Copyright (C) 2005-2009 MaNGOS <http://getmangos.com/>
2008-10-14 11:57:03 -05:00
*
* Copyright (C) 2008-2009 Trinity <http://www.trinitycore.org/>
2008-10-02 16:23:55 -05:00
*
* 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
2008-10-14 11:57:03 -05:00
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2008-10-02 16:23:55 -05:00
* 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
2008-10-14 11:57:03 -05:00
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
2008-10-02 16:23:55 -05:00
*/
2008-10-14 11:57:03 -05:00
#ifndef TRINITYCORE_TEMPSUMMON_H
#define TRINITYCORE_TEMPSUMMON_H
2008-10-02 16:23:55 -05:00
#include "Creature.h"
class TempSummon : public Creature
2008-10-02 16:23:55 -05:00
{
public:
2009-03-20 14:01:46 -06:00
explicit TempSummon(SummonPropertiesEntry const *properties, Unit *owner);
virtual ~TempSummon(){};
2008-10-02 16:23:55 -05:00
void Update(uint32 time);
2009-03-20 14:01:46 -06:00
virtual void InitSummon(uint32 lifetime);
void UnSummon();
void RemoveFromWorld();
2009-03-20 14:01:46 -06:00
void SetTempSummonType(TempSummonType type);
2008-10-02 16:23:55 -05:00
void SaveToDB();
2009-03-25 21:32:34 -06:00
Unit* GetSummoner() const;
2009-03-20 14:01:46 -06:00
SummonPropertiesEntry const *m_Properties;
2008-10-02 16:23:55 -05:00
private:
TempSummonType m_type;
uint32 m_timer;
uint32 m_lifetime;
2009-03-20 14:01:46 -06:00
uint64 m_summonerGUID;
2008-10-02 16:23:55 -05:00
};
2009-03-20 14:01:46 -06:00
class Guardian : public TempSummon
{
public:
Guardian(SummonPropertiesEntry const *properties, Unit *owner);
bool Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, uint32 pet_number);
void InitSummon(uint32 duration);
void RemoveFromWorld();
2009-03-25 21:32:34 -06:00
bool InitStatsForLevel(uint32 level);
int32 GetBonusDamage() { return m_bonusdamage; }
void SetBonusDamage(int32 damage) { m_bonusdamage = damage; }
2009-03-26 09:01:23 -06:00
Unit *GetOwner() { return m_owner; }
2009-03-20 14:01:46 -06:00
protected:
Unit *m_owner;
2009-03-25 21:32:34 -06:00
int32 m_bonusdamage;
2009-03-20 14:01:46 -06:00
};
2008-10-02 16:23:55 -05:00
#endif
2009-02-17 20:07:49 -06:00