Merge commit 'origin/master' into 310

Conflicts:
	src/game/UpdateData.cpp
This commit is contained in:
tomrus88 2009-06-07 21:42:02 +04:00
commit 1f87157edf
20 changed files with 195 additions and 139 deletions

View file

@ -163,39 +163,6 @@ Debugging options:
])
AC_MSG_RESULT($MANGOSD_DEBUG_INFO)
# Enable CLI console?
AC_MSG_CHECKING(whether cli console is enabled)
MANGOSD_ENABLE_CLI=no
AC_ARG_ENABLE(cli,
[ --enable-cli Turn on command console system],
[
if test "$enableval" = "yes" ; then
CFLAGS="-DENABLE_CLI $CFLAGS"
CXXFLAGS="-DENABLE_CLI $CXXFLAGS"
MANGOSD_ENABLE_CLI=yes
elif test "$withval" != "no" ; then
AC_MSG_ERROR(Please choose yes or no)
fi
])
AC_MSG_RESULT($MANGOSD_ENABLE_CLI)
# Enable remote console?
AC_MSG_CHECKING(whether remote console is enabled)
MANGOSD_ENABLE_RA=no
AC_ARG_ENABLE(ra,
[ --enable-ra Turn on remote console system],
[
if test "$enableval" = "yes" ; then
CFLAGS="-DENABLE_RA $CFLAGS"
CXXFLAGS="-DENABLE_RA $CXXFLAGS"
MANGOSD_ENABLE_RA=yes
elif test "$withval" != "no" ; then
AC_MSG_ERROR(Please choose yes or no)
fi
])
AC_MSG_RESULT($MANGOSD_ENABLE_RA)
## Check for required header files.
AC_HEADER_STDC
AC_HEADER_DIRENT
@ -211,10 +178,8 @@ AC_CHECK_HEADERS([zlib.h])
AC_HEADER_STDBOOL
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_STRUCT_TM
AC_TYPE_UINT64_T
AC_C_VOLATILE
AC_CHECK_TYPES([ptrdiff_t])
@ -272,8 +237,6 @@ MANGOS_LIBS="$POSTGRE_LIBS $MYSQL_LIBS $ZLIB $COMPATLIB $SSLLIB $MANGOS_LIBS"
## Export defined variables
AC_SUBST(DOXYGEN)
AC_SUBST(MANGOSD_DEBUG_INFO)
AC_SUBST(MANGOSD_ENABLE_CLI)
AC_SUBST(MANGOSD_ENABLE_RA)
## Additional CPPFLAGS and LDFLAGS.
AC_SUBST(MANGOS_INCLUDES)

View file

@ -150,7 +150,7 @@ namespace SOCKETS_NAMESPACE {
# error FreeBSD versions prior to 400014 does not support ipv6
# endif
#elif defined __NetBSD__
#elif defined (__NetBSD__) || defined (__OpenBSD__)
# if !defined(MSG_NOSIGNAL)
# define MSG_NOSIGNAL 0
# endif

View file

@ -23,6 +23,10 @@
#include "G3D/debug.h"
#include "G3D/format.h"
#if defined(__OpenBSD__)
#include <stdint.h>
#endif
#ifdef G3D_WIN32
#include <conio.h>

View file

@ -1,3 +1,3 @@
ALTER TABLE character_db_version CHANGE COLUMN required_7059_02_characters_pet_spell required_7067_03_characters_character_spell bit;
DELETE FROM `character_spell` WHERE `spell` IN (7376,3025,5419,5421,21156,7381,1178,21178,9635,21178,24905,5420,34123,33948,34090,34764,40121,40122);
DELETE FROM `character_spell` WHERE `spell` IN (7376,3025,5419,5421,21156,7381,1178,21178,9635,21178,24905,5420,34123,33948,34764,40121,40122);

View file

@ -239,9 +239,13 @@ struct CreatureInfo
return SKILL_SKINNING; // normal case
}
bool isTameable() const
bool isTameable(bool exotic) const
{
return type == CREATURE_TYPE_BEAST && family != 0 && (type_flags & CREATURE_TYPEFLAGS_TAMEABLE);
if(type != CREATURE_TYPE_BEAST || family == 0 || (type_flags & CREATURE_TYPEFLAGS_TAMEABLE)==0)
return false;
// if can tame exotic then can tame any temable
return exotic || (type_flags & CREATURE_TYPEFLAGS_EXOTIC)==0;
}
};

View file

@ -396,7 +396,10 @@ void GameObject::Update(uint32 /*p_time*/)
if(GetOwnerGUID())
{
m_respawnTime = 0;
if(Unit* owner = GetOwner())
owner->RemoveGameObject(this, false);
SetRespawnTime(0);
Delete();
return;
}

View file

@ -1780,7 +1780,7 @@ bool ChatHandler::HandleNpcTameCommand(const char* /*args*/)
CreatureInfo const* cInfo = creatureTarget->GetCreatureInfo();
if (!cInfo->isTameable ())
if (!cInfo->isTameable (player->CanTameExoticPets()))
{
PSendSysMessage (LANG_CREATURE_NON_TAMEABLE,cInfo->Entry);
SetSentErrorMessage (true);

View file

@ -582,11 +582,10 @@ void WorldSession::HandleStablePet( WorldPacket & recv_data )
Pet *pet = _player->GetPet();
WorldPacket data(SMSG_STABLE_RESULT, 200); // guess size
// can't place in stable dead pet
if(!pet||!pet->isAlive()||pet->getPetType()!=HUNTER_PET)
{
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x06);
SendPacket(&data);
return;
@ -615,6 +614,7 @@ void WorldSession::HandleStablePet( WorldPacket & recv_data )
delete result;
}
WorldPacket data(SMSG_STABLE_RESULT, 1);
if( free_slot > 0 && free_slot <= GetPlayer()->m_stableSlots)
{
_player->RemovePet(pet,PetSaveMode(free_slot));
@ -647,11 +647,40 @@ void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
if(GetPlayer()->hasUnitState(UNIT_STAT_DIED))
GetPlayer()->RemoveSpellsCausingAura(SPELL_AURA_FEIGN_DEATH);
WorldPacket data(SMSG_STABLE_RESULT, 200); // guess size
uint32 creature_id = 0;
{
QueryResult *result = CharacterDatabase.PQuery("SELECT entry FROM character_pet WHERE owner = '%u' AND id = '%u' AND slot >='%u' AND slot <= '%u'",
_player->GetGUIDLow(),petnumber,PET_SAVE_FIRST_STABLE_SLOT,PET_SAVE_LAST_STABLE_SLOT);
if(result)
{
Field *fields = result->Fetch();
creature_id = fields[0].GetUInt32();
delete result;
}
}
if(!creature_id)
{
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x06);
SendPacket(&data);
return;
}
CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(creature_id);
if(!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
{
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x06);
SendPacket(&data);
return;
}
Pet* pet = _player->GetPet();
if(pet && pet->isAlive())
{
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x06);
SendPacket(&data);
return;
@ -661,28 +690,19 @@ void WorldSession::HandleUnstablePet( WorldPacket & recv_data )
if(pet)
_player->RemovePet(pet,PET_SAVE_AS_DELETED);
Pet *newpet = NULL;
QueryResult *result = CharacterDatabase.PQuery("SELECT entry FROM character_pet WHERE owner = '%u' AND id = '%u' AND slot >='%u' AND slot <= '%u'",
_player->GetGUIDLow(),petnumber,PET_SAVE_FIRST_STABLE_SLOT,PET_SAVE_LAST_STABLE_SLOT);
if(result)
{
Field *fields = result->Fetch();
uint32 petentry = fields[0].GetUInt32();
newpet = new Pet(HUNTER_PET);
if(!newpet->LoadPetFromDB(_player,petentry,petnumber))
Pet *newpet = new Pet(HUNTER_PET);
if(!newpet->LoadPetFromDB(_player,creature_id,petnumber))
{
delete newpet;
newpet = NULL;
}
delete result;
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x06);
SendPacket(&data);
return;
}
if(newpet)
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x09);
else
data << uint8(0x06);
SendPacket(&data);
}
@ -768,15 +788,32 @@ void WorldSession::HandleStableSwapPet( WorldPacket & recv_data )
Field *fields = result->Fetch();
uint32 slot = fields[0].GetUInt32();
uint32 petentry = fields[1].GetUInt32();
uint32 creature_id = fields[1].GetUInt32();
delete result;
if(!creature_id)
{
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x06);
SendPacket(&data);
return;
}
CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(creature_id);
if(!creatureInfo || !creatureInfo->isTameable(_player->CanTameExoticPets()))
{
WorldPacket data(SMSG_STABLE_RESULT, 1);
data << uint8(0x06);
SendPacket(&data);
return;
}
// move alive pet to slot or delete dead pet
_player->RemovePet(pet,pet->isAlive() ? PetSaveMode(slot) : PET_SAVE_AS_DELETED);
// summon unstabled pet
Pet *newpet = new Pet;
if(!newpet->LoadPetFromDB(_player,petentry,pet_number))
if(!newpet->LoadPetFromDB(_player,creature_id,pet_number))
{
delete newpet;
data << uint8(0x06);

View file

@ -134,6 +134,17 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
return false;
}
PetType pet_type = PetType(fields[18].GetUInt8());
if(pet_type==HUNTER_PET)
{
CreatureInfo const* creatureInfo = objmgr.GetCreatureTemplate(petentry);
if(!creatureInfo || !creatureInfo->isTameable(owner->CanTameExoticPets()))
{
delete result;
return false;
}
}
uint32 pet_number = fields[0].GetUInt32();
if (current && owner->IsPetNeedBeTemporaryUnsummoned())
@ -164,7 +175,7 @@ bool Pet::LoadPetFromDB( Player* owner, uint32 petentry, uint32 petnumber, bool
return false;
}
setPetType(PetType(fields[18].GetUInt8()));
setPetType(pet_type);
setFaction(owner->getFaction());
SetUInt32Value(UNIT_CREATED_BY_SPELL, summon_spell_id);

View file

@ -3482,6 +3482,14 @@ bool Player::resetTalents(bool no_cost)
//FIXME: remove pet before or after unlearn spells? for now after unlearn to allow removing of talent related, pet affecting auras
RemovePet(NULL,PET_SAVE_NOT_IN_SLOT, true);
/* when prev line will dropped use next line
if(Pet* pet = GetPet())
{
if(pet->getPetType()==HUNTER_PET && !pet->GetCreatureInfo()->isTameable(CanTameExoticPets()))
RemovePet(NULL,PET_SAVE_NOT_IN_SLOT, true);
}
*/
if(m_canTitanGrip)
{

View file

@ -1747,6 +1747,7 @@ class MANGOS_DLL_SPEC Player : public Unit
void SetCanDualWield(bool value) { m_canDualWield = value; }
bool CanTitanGrip() const { return m_canTitanGrip ; }
void SetCanTitanGrip(bool value) { m_canTitanGrip = value; }
bool CanTameExoticPets() const { return isGameMaster() || HasAuraType(SPELL_AURA_ALLOW_TAME_PET_TYPE); }
void SetRegularAttackTime();
void SetBaseModValue(BaseModGroup modGroup, BaseModType modType, float value) { m_auraBaseMod[modGroup][modType] = value; }

View file

@ -1821,10 +1821,11 @@ enum CreatureFamily
enum CreatureTypeFlags
{
CREATURE_TYPEFLAGS_TAMEABLE = 0x0001,
CREATURE_TYPEFLAGS_HERBLOOT = 0x0100,
CREATURE_TYPEFLAGS_MININGLOOT = 0x0200,
CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x8000
CREATURE_TYPEFLAGS_TAMEABLE = 0x00001,
CREATURE_TYPEFLAGS_HERBLOOT = 0x00100,
CREATURE_TYPEFLAGS_MININGLOOT = 0x00200,
CREATURE_TYPEFLAGS_ENGINEERLOOT = 0x08000,
CREATURE_TYPEFLAGS_EXOTIC = 0x10000
};
enum CreatureEliteType

View file

@ -1561,7 +1561,8 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
else
{
Unit* pUnitTarget = m_targets.getUnitTarget();
if(!pUnitTarget)
Unit* originalCaster = GetOriginalCaster();
if(!pUnitTarget || !originalCaster)
break;
unMaxTargets = EffectChainTarget;
@ -1578,28 +1579,22 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
cell.data.Part.reserved = ALL_DISTRICT;
cell.SetNoCreate();
Unit* originalCaster = GetOriginalCaster();
if(originalCaster)
{
std::list<Unit *> tempUnitMap;
{
MaNGOS::AnyAoETargetUnitInObjectRangeCheck u_check(pUnitTarget, originalCaster, max_range, false);
MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck> searcher(m_caster, tempUnitMap, u_check);
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, WorldTypeMapContainer> world_unit_searcher(searcher);
TypeContainerVisitor<MaNGOS::UnitListSearcher<MaNGOS::AnyAoETargetUnitInObjectRangeCheck>, GridTypeMapContainer> grid_unit_searcher(searcher);
CellLock<GridReadGuard> cell_lock(cell, p);
cell_lock->Visit(cell_lock, world_unit_searcher, *m_caster->GetMap());
cell_lock->Visit(cell_lock, grid_unit_searcher, *m_caster->GetMap());
}
tempUnitMap.sort(TargetDistanceOrder(pUnitTarget));
if (tempUnitMap.empty())
break;
tempUnitMap.sort(TargetDistanceOrder(pUnitTarget));
if (*tempUnitMap.begin() == pUnitTarget)
tempUnitMap.erase (tempUnitMap.begin());
@ -1612,23 +1607,19 @@ void Spell::SetTargetMap(uint32 i,uint32 cur,UnitList& TagUnitMap)
{
if (!prev->IsWithinDist (*next,CHAIN_SPELL_JUMP_RADIUS))
break;
if (!prev->IsWithinLOSInMap (*next))
{
++next;
continue;
}
prev = *next;
TagUnitMap.push_back(prev);
tempUnitMap.erase(next);
tempUnitMap.sort (TargetDistanceOrder(prev));
next = tempUnitMap.begin();
--t;
}
}
}
}break;
case TARGET_ALL_ENEMY_IN_AREA:
{
@ -4119,14 +4110,19 @@ SpellCastResult Spell::CheckCast(bool strict)
}
case SPELL_EFFECT_TAMECREATURE:
{
if (m_caster->GetTypeId() != TYPEID_PLAYER)
return SPELL_FAILED_BAD_TARGETS;
if (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetTypeId() == TYPEID_PLAYER)
return SPELL_FAILED_BAD_IMPLICIT_TARGETS;
if (m_targets.getUnitTarget()->getLevel() > m_caster->getLevel())
Creature* target = (Creature*)m_targets.getUnitTarget();
if (target->getLevel() > m_caster->getLevel())
return SPELL_FAILED_HIGHLEVEL;
// use SMSG_PET_TAME_FAILURE?
if (!((Creature*)m_targets.getUnitTarget())->GetCreatureInfo()->isTameable ())
if (!target->GetCreatureInfo()->isTameable (((Player*)m_caster)->CanTameExoticPets()))
return SPELL_FAILED_BAD_TARGETS;
if(m_caster->GetPetGUID())

View file

@ -2023,7 +2023,7 @@ void Aura::TriggerSpellWithValue()
uint32 trigger_spell_id = GetSpellProto()->EffectTriggerSpell[m_effIndex];
int32 basepoints0 = this->GetModifier()->m_amount;
caster->CastCustomSpell(target, trigger_spell_id, &basepoints0, 0, 0, true, 0, this);
caster->CastCustomSpell(target, trigger_spell_id, &basepoints0, NULL, NULL, true, NULL, this);
}
/*********************************************************/
@ -6416,7 +6416,7 @@ void Aura::PeriodicDummyTick()
// Increases your attack power by $s1 for every $s2 armor value you have.
// Calculate AP bonus (from 1 efect of this spell)
int32 apBonus = m_modifier.m_amount * m_target->GetArmor() / m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, 0, true, 0, this);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, NULL, true, NULL, this);
return;
}
break;
@ -6439,7 +6439,7 @@ void Aura::PeriodicDummyTick()
int32 mod = (rage < 100) ? rage : 100;
int32 points = m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target);
int32 regen = m_target->GetMaxHealth() * (mod * points / 10) / 1000;
m_target->CastCustomSpell(m_target, 22845, &regen, 0, 0, true, 0, this);
m_target->CastCustomSpell(m_target, 22845, &regen, NULL, NULL, true, NULL, this);
m_target->SetPower(POWER_RAGE, rage-mod);
return;
}
@ -6511,11 +6511,11 @@ void Aura::PeriodicDummyTick()
// Full damage to target at 0 tick
if (m_duration > m_modifier.periodictime)
{
caster->CastCustomSpell(m_target, 53352, &damage, 0, 0, true, 0, this);
caster->CastCustomSpell(m_target, 53352, &damage, NULL, NULL, true, NULL, this);
return;
}
damage/=4;
caster->CastCustomSpell(m_target, 56298, &damage, 0, 0, true, 0, this);
caster->CastCustomSpell(m_target, 56298, &damage, NULL, NULL, true, NULL, this);
return;
}
switch (spell->Id)
@ -6556,7 +6556,7 @@ void Aura::PeriodicDummyTick()
if (spell->SpellFamilyFlags & UI64LIT(0x0000000000000020))
{
if (caster)
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, 0, this);
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, NULL, this);
return;
}
// Raise Dead
@ -6589,7 +6589,7 @@ void Aura::PeriodicDummyTick()
// Increases your attack power by $s1 for every $s2 armor value you have.
// Calculate AP bonus (from 1 efect of this spell)
int32 apBonus = m_modifier.m_amount * m_target->GetArmor() / m_target->CalculateSpellDamage(spell, 1, spell->EffectBasePoints[1], m_target);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, 0, true, 0, this);
m_target->CastCustomSpell(m_target, 61217, &apBonus, &apBonus, NULL, true, NULL, this);
return;
}
// Reaping

View file

@ -302,8 +302,8 @@ void Player::UpdateAttackPowerAndDamage(bool ranged )
Unit::AuraList const& mDummy = GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator itr = mDummy.begin(); itr != mDummy.end(); ++itr)
{
// Predatory Strikes
if ((*itr)->GetSpellProto()->SpellIconID == 1563)
// Predatory Strikes (effect 0)
if ((*itr)->GetEffIndex()==0 && (*itr)->GetSpellProto()->SpellIconID == 1563)
{
mLevelMult = (*itr)->GetModifier()->m_amount / 100.0f;
break;

View file

@ -1808,7 +1808,7 @@ void Unit::CalcAbsorbResist(Unit *pVictim,SpellSchoolMask schoolMask, DamageEffe
// This, if I'm not mistaken, shows that we get back ~2% of the absorbed damage as runic power.
int32 absorbed = RemainingDamage * currentAbsorb / 100;
int32 regen = absorbed * 2 / 10;
pVictim->CastCustomSpell(pVictim, 49088, &regen, 0, 0, true, 0, *i);
pVictim->CastCustomSpell(pVictim, 49088, &regen, NULL, NULL, true, NULL, *i);
RemainingDamage -= absorbed;
continue;
}
@ -5506,14 +5506,18 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
int32 holy = caster->SpellBaseDamageBonus(SPELL_SCHOOL_MASK_HOLY) +
caster->SpellBaseDamageBonusForVictim(SPELL_SCHOOL_MASK_HOLY, this);
basepoints0 = int32(ap*0.10f + 0.10f*holy);
pVictim->CastCustomSpell(pVictim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
pVictim->CastCustomSpell(pVictim, 20267, &basepoints0, NULL, NULL, true, NULL, triggeredByAura);
return true;
}
// Judgement of Wisdom
case 20186:
{
if (pVictim->getPowerType() == POWER_MANA)
pVictim->CastSpell(pVictim, 20268, true, 0, triggeredByAura);
{
// 2% of maximum base mana
basepoints0 = int32(pVictim->GetCreateMana() * 2 / 100);
pVictim->CastCustomSpell(pVictim, 20268, &basepoints0, NULL, NULL, true, NULL, triggeredByAura);
}
return true;
}
// Holy Power (Redemption Armor set)
@ -5547,6 +5551,29 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
}
break;
}
case 25899: // Greater Blessing of Sanctuary
case 20911: // Blessing of Sanctuary
{
if (target->GetTypeId() != TYPEID_PLAYER)
return false;
target = this;
switch (target->getPowerType())
{
case POWER_MANA:
triggered_spell_id = 57319;
break;
case POWER_RAGE:
triggered_spell_id = 57320;
break;
case POWER_RUNIC_POWER:
triggered_spell_id = 57321;
break;
default:
return false;
}
break;
}
// Seal of Vengeance (damage calc on apply aura)
case 31801:
{
@ -5640,7 +5667,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (procSpell->Effect[i] == SPELL_EFFECT_ENERGIZE)
{
int32 mana = procSpell->EffectBasePoints[i];
CastCustomSpell(this, 54986, 0, &mana, 0, true, castItem, triggeredByAura);
CastCustomSpell(this, 54986, NULL, &mana, NULL, true, castItem, triggeredByAura);
break;
}
return true;
@ -6870,7 +6897,7 @@ bool Unit::HandleOverrideClassScriptAuraProc(Unit *pVictim, uint32 damage, Aura
return false;
int32 cost = procSpell->manaCost + procSpell->ManaCostPercentage * GetCreateMana() / 100;
int32 basepoints0 = cost * triggeredByAura->GetModifier()->m_amount/100;
CastCustomSpell(this, 47762, &basepoints0, 0, 0, true, 0, triggeredByAura);
CastCustomSpell(this, 47762, &basepoints0, NULL, NULL, true, NULL, triggeredByAura);
return true;
}
}
@ -10763,6 +10790,7 @@ void Unit::ProcDamageAndSpellFor( bool isVictim, Unit * pTarget, uint32 procFlag
DealSpellDamage(&damageInfo, true);
break;
}
case SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN:
case SPELL_AURA_MANA_SHIELD:
case SPELL_AURA_OBS_MOD_MANA:
case SPELL_AURA_DUMMY:

View file

@ -309,7 +309,7 @@ class ByteBuffer
}
void append(const ByteBuffer& buffer)
{
if(buffer.size()) append(buffer.contents(),buffer.wpos());
if(buffer.wpos()) append(buffer.contents(),buffer.wpos());
}
void appendPackGUID(uint64 guid)

View file

@ -79,16 +79,16 @@ class MANGOS_DLL_SPEC Database
template<class Class, typename ParamType1>
bool AsyncPQuery(Class *object, void (Class::*method)(QueryResult*, ParamType1), ParamType1 param1, const char *format,...) ATTR_PRINTF(5,6);
template<class Class, typename ParamType1, typename ParamType2>
bool AsyncPQuery(Class *object, void (Class::*method)(QueryResult*, ParamType1, ParamType2), ParamType1 param1, ParamType2 param2, const char *format,...) ATTR_PRINTF(5,6);
bool AsyncPQuery(Class *object, void (Class::*method)(QueryResult*, ParamType1, ParamType2), ParamType1 param1, ParamType2 param2, const char *format,...) ATTR_PRINTF(6,7);
template<class Class, typename ParamType1, typename ParamType2, typename ParamType3>
bool AsyncPQuery(Class *object, void (Class::*method)(QueryResult*, ParamType1, ParamType2, ParamType3), ParamType1 param1, ParamType2 param2, ParamType3 param3, const char *format,...) ATTR_PRINTF(5,6);
bool AsyncPQuery(Class *object, void (Class::*method)(QueryResult*, ParamType1, ParamType2, ParamType3), ParamType1 param1, ParamType2 param2, ParamType3 param3, const char *format,...) ATTR_PRINTF(7,8);
// PQuery / static
template<typename ParamType1>
bool AsyncPQuery(void (*method)(QueryResult*, ParamType1), ParamType1 param1, const char *format,...) ATTR_PRINTF(5,6);
bool AsyncPQuery(void (*method)(QueryResult*, ParamType1), ParamType1 param1, const char *format,...) ATTR_PRINTF(4,5);
template<typename ParamType1, typename ParamType2>
bool AsyncPQuery(void (*method)(QueryResult*, ParamType1, ParamType2), ParamType1 param1, ParamType2 param2, const char *format,...) ATTR_PRINTF(5,6);
template<typename ParamType1, typename ParamType2, typename ParamType3>
bool AsyncPQuery(void (*method)(QueryResult*, ParamType1, ParamType2, ParamType3), ParamType1 param1, ParamType2 param2, ParamType3 param3, const char *format,...) ATTR_PRINTF(5,6);
bool AsyncPQuery(void (*method)(QueryResult*, ParamType1, ParamType2, ParamType3), ParamType1 param1, ParamType2 param2, ParamType3 param3, const char *format,...) ATTR_PRINTF(6,7);
template<class Class>
// QueryHolder
bool DelayQueryHolder(Class *object, void (Class::*method)(QueryResult*, SqlQueryHolder*), SqlQueryHolder *holder);

View file

@ -1,4 +1,4 @@
#ifndef __REVISION_NR_H__
#define __REVISION_NR_H__
#define REVISION_NR "7961"
#define REVISION_NR "7975"
#endif // __REVISION_NR_H__