[svn] * Little fix in RandomMovementGenerator

* Updated to 6731 and 680

--HG--
branch : trunk
rename : 6721-676 => 6731-680
This commit is contained in:
Neo2003
2008-10-06 04:48:59 -05:00
parent 010ed993e1
commit 1fc5c0d6d7
49 changed files with 7104 additions and 6884 deletions
View File
+2
View File
@@ -2338,6 +2338,7 @@ INSERT INTO `mangos_string` VALUES
(328,'Characters at account %s (Id: %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(329,' %s (GUID %u)',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(330,'No players found!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(331,'Extended item cost %u not exist',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(400,'|cffff0000[System Message]:|rScripts reloaded',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(401,'You change security level of %s to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
(402,'%s changed your security level to %i.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),
@@ -10485,6 +10486,7 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `quest_template`;
CREATE TABLE `quest_template` (
`entry` mediumint(8) unsigned NOT NULL default '0',
`Method` tinyint(3) unsigned NOT NULL default '2',
`ZoneOrSort` smallint(6) NOT NULL default '0',
`SkillOrClass` smallint(6) NOT NULL default '0',
`MinLevel` tinyint(3) unsigned NOT NULL default '0',
+4
View File
@@ -0,0 +1,4 @@
ALTER TABLE `quest_template` ADD COLUMN `Method` tinyint(3) unsigned NOT NULL default '2' AFTER `entry`;
DELETE FROM mangos_string WHERE entry IN (331);
INSERT INTO mangos_string VALUES
(331,'Extended item cost %u not exist',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+1
View File
@@ -679,6 +679,7 @@ Another example: the number "5" (101 in Binary, selecting first and third option
2 4 CAST_FORCE_CAST Forces spell to cast even if the target is possibly out of range or the creature is possibly out of mana
3 8 CAST_NO_MELEE_IF_OOM Prevents creature from entering melee if out of mana or out of range
4 16 CAST_FORCE_TARGET_SELF Forces the target to cast this spell on itself
5 32 CAST_AURA_NOT_PRESENT Only casts the spell on the target if the target does not have the aura from that spell on itself already.
NOTE: You can add the numbers in the decimal column to combine flags.
For example if you wanted to use CAST_NO_MELEE_IF_OOM(8) and CAST_TRIGGERED(2) you would simply use 10 in the cast flags field (8 + 2 = 10).
+4 -4
View File
@@ -35,8 +35,8 @@ void ScriptedAI::MoveInLineOfSight(Unit *who)
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -54,8 +54,8 @@ void ScriptedAI::AttackStart(Unit* who)
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -582,8 +582,8 @@ void Scripted_NoMovementAI::MoveInLineOfSight(Unit *who)
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -601,8 +601,8 @@ void Scripted_NoMovementAI::AttackStart(Unit* who)
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -55,8 +55,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
case EVENT_T_SPAWNED:
ProcessEvent(*i);
break;
default:
break;
}
}
@@ -612,12 +610,18 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
caster = target;
}
//Interrupt any previous spell
if (caster->IsNonMeleeSpellCasted(false) && param3 & CAST_INTURRUPT_PREVIOUS)
caster->InterruptNonMeleeSpells(false);
//Allowed to cast only if not casting (unless we interrupt ourself) or if spell is triggered
bool canCast = !(caster->IsNonMeleeSpellCasted(false) && (param3 & CAST_TRIGGERED | CAST_INTURRUPT_PREVIOUS));
//Cast only if not casting or if spell is triggered
if (param3 & CAST_TRIGGERED || !caster->IsNonMeleeSpellCasted(false))
// If cast flag CAST_AURA_NOT_PRESENT is active, check if target already has aura on them
if(param3 & CAST_AURA_NOT_PRESENT)
{
for(uint8 i = 0; i < 3; ++i)
if(target->HasAura(param1, i))
return;
}
if (canCast)
{
const SpellEntry* tSpell = GetSpellStore()->LookupEntry(param1);
@@ -638,7 +642,14 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim(), AttackDistance, AttackAngle);
}
}else caster->CastSpell(target, param1, (param3 & CAST_TRIGGERED));
}else
{
//Interrupt any previous spell
if (caster->IsNonMeleeSpellCasted(false) && param3 & CAST_INTURRUPT_PREVIOUS)
caster->InterruptNonMeleeSpells(false);
caster->CastSpell(target, param1, (param3 & CAST_TRIGGERED));
}
}else if (EAI_ErrorLevel > 0)
error_db_log("SD2: EventAI event %d creature %d attempt to cast spell that doesn't exist %d", EventId, m_creature->GetEntry(), param1);
@@ -996,11 +1007,11 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
error_db_log("SD2: Creature %u using Event %u (Type = %u) has InitialMax < InitialMin. Event disabled.", m_creature->GetEntry(), (*i).Event.event_id, (*i).Event.event_type);
}
break;
default:
//default:
//TODO: enable below code line / verify this is correct to enable events previously disabled (ex. aggro yell), instead of enable this in void Aggro()
//(*i).Enabled = true;
//(*i).Time = 0;
break;
//break;
}
}
}
@@ -1029,8 +1040,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
case EVENT_T_EVADE:
ProcessEvent(*i);
break;
default:
break;
}
}
}
@@ -1050,8 +1059,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
case EVENT_T_DEATH:
ProcessEvent(*i, killer);
break;
default:
break;
}
}
}
@@ -1069,8 +1076,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
case EVENT_T_KILL:
ProcessEvent(*i, victim);
break;
default:
break;
}
}
@@ -1089,8 +1094,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
case EVENT_T_SUMMONED_UNIT:
ProcessEvent(*i, pUnit);
break;
default:
break;
}
}
}
@@ -1145,8 +1148,8 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -1193,8 +1196,8 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -1215,8 +1218,6 @@ struct MANGOS_DLL_DECL Mob_EventAI : public ScriptedAI
ProcessEvent(*i, pUnit);
}
break;
default:
break;
}
}
}
@@ -113,6 +113,7 @@ enum CastFlags
CAST_FORCE_CAST = 0x04, //Forces cast even if creature is out of mana or out of range
CAST_NO_MELEE_IF_OOM = 0x08, //Prevents creature from entering melee if out of mana or out of range
CAST_FORCE_TARGET_SELF = 0x10, //Forces the target to cast this spell on itself
CAST_AURA_NOT_PRESENT = 0x20, //Only casts the spell if the target does not have an aura from the spell
};
enum EventFlags
@@ -104,8 +104,6 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI
DoCast(m_creature->getVictim(), SPELL_MOONFIRE);
Class_Timer = 10000;
break;
default:
break;
}
}else Class_Timer -= diff;
@@ -204,8 +202,8 @@ struct MANGOS_DLL_DECL boss_exarch_maladaarAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -106,8 +106,8 @@ struct MANGOS_DLL_DECL boss_nexusprince_shaffarAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -115,8 +115,8 @@ struct MANGOS_DLL_DECL boss_talon_king_ikissAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -125,8 +125,8 @@ struct MANGOS_DLL_DECL boss_grandmaster_vorpilAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -74,8 +74,8 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -95,8 +95,8 @@ struct MANGOS_DLL_DECL boss_murmurAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -61,8 +61,8 @@ struct MANGOS_DLL_DECL npc_ragged_johnAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -117,8 +117,8 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -138,8 +138,8 @@ struct MANGOS_DLL_DECL boss_omor_the_unscarredAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -108,8 +108,8 @@ struct MANGOS_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f))
@@ -200,8 +200,8 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
if( !InCombat )
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -237,8 +237,8 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI
if( !InCombat )
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -582,13 +582,13 @@ struct MANGOS_DLL_DECL boss_malchezaarAI : public ScriptedAI
if( m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE) && !m_creature->IsNonMeleeSpellCasted(false))
{
//Check for base attack
if( m_creature->isAttackReady())
if( m_creature->isAttackReady() && m_creature->getVictim() )
{
m_creature->AttackerStateUpdate(m_creature->getVictim());
m_creature->resetAttackTimer();
}
//Check for offhand attack
if( m_creature->isAttackReady(OFF_ATTACK))
if( m_creature->isAttackReady(OFF_ATTACK) && m_creature->getVictim() )
{
m_creature->AttackerStateUpdate(m_creature->getVictim(), OFF_ATTACK);
m_creature->resetAttackTimer(OFF_ATTACK);
@@ -163,9 +163,6 @@ class MANGOS_DLL_SPEC instance_molten_core : public ScriptedInstance
case ID_FLAMEWAKERPRIEST:
FlamewakerPriest = creature->GetGUID();
break;
default:
return;
}
}
@@ -264,8 +264,6 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI
}
++Phase;
break;
default:
break;
}
} else Event_Timer -= diff;
@@ -138,8 +138,8 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -153,8 +153,8 @@ struct MANGOS_DLL_DECL npc_millhouse_manastormAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -444,8 +444,6 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
case 7:
pInstance->SetData(TYPE_WARDEN_5,IN_PROGRESS);
break;
default:
break;
}
CanSpawn = true;
}
@@ -505,8 +503,6 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
DoYell(YELL_WELCOME,LANG_UNIVERSAL,NULL);
DoPlaySoundToSet(m_creature,SOUND_WELCOME);
break;
default:
break;
}
CanSpawn = false;
++Phase;
@@ -553,8 +549,6 @@ struct MANGOS_DLL_DECL npc_warden_mellicharAI : public ScriptedAI
DoPrepareForPhase();
EventProgress_Timer = 15000;
break;
default:
break;
}
}
} else EventProgress_Timer -= diff;
@@ -130,8 +130,8 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -148,8 +148,8 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
if( !InCombat )
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -236,8 +236,6 @@ struct MANGOS_DLL_DECL boss_harbinger_skyrissAI : public ScriptedAI
case 3:
Intro = true;
break;
default:
break;
}
}else Intro_Timer -=diff;
}
@@ -215,8 +215,8 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -234,8 +234,8 @@ struct MANGOS_DLL_DECL advisorbase_ai : public ScriptedAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -863,14 +863,10 @@ struct MANGOS_DLL_DECL boss_kaelthasAI : public ScriptedAI
DoYell(SAY_SUMMON_PHOENIX1, LANG_UNIVERSAL, NULL);
DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX1);
break;
case 1:
DoYell(SAY_SUMMON_PHOENIX2, LANG_UNIVERSAL, NULL);
DoPlaySoundToSet(m_creature, SOUND_SUMMON_PHOENIX2);
break;
default:
break;
}
Phoenix_Timer = 60000;
@@ -1252,8 +1248,8 @@ struct MANGOS_DLL_DECL boss_grand_astromancer_capernianAI : public advisorbase_a
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
@@ -665,8 +665,8 @@ struct MANGOS_DLL_DECL boss_veklorAI : public boss_twinemperorsAI
if (!InCombat)
{
Aggro(who);
InCombat = true;
Aggro(who);
}
}
}
-56
View File
@@ -34,62 +34,6 @@
bool ChatHandler::load_command_table = true;
LanguageDesc lang_description[LANGUAGES_COUNT] =
{
{ LANG_ADDON, 0, 0 },
{ LANG_UNIVERSAL, 0, 0 },
{ LANG_ORCISH, 669, SKILL_LANG_ORCISH },
{ LANG_DARNASSIAN, 671, SKILL_LANG_DARNASSIAN },
{ LANG_TAURAHE, 670, SKILL_LANG_TAURAHE },
{ LANG_DWARVISH, 672, SKILL_LANG_DWARVEN },
{ LANG_COMMON, 668, SKILL_LANG_COMMON },
{ LANG_DEMONIC, 815, SKILL_LANG_DEMON_TONGUE },
{ LANG_TITAN, 816, SKILL_LANG_TITAN },
{ LANG_THALASSIAN, 813, SKILL_LANG_THALASSIAN },
{ LANG_DRACONIC, 814, SKILL_LANG_DRACONIC },
{ LANG_KALIMAG, 817, SKILL_LANG_OLD_TONGUE },
{ LANG_GNOMISH, 7340, SKILL_LANG_GNOMISH },
{ LANG_TROLL, 7341, SKILL_LANG_TROLL },
{ LANG_GUTTERSPEAK, 17737, SKILL_LANG_GUTTERSPEAK },
{ LANG_DRAENEI, 29932, SKILL_LANG_DRAENEI },
{ LANG_ZOMBIE, 0, 0 },
{ LANG_GNOMISH_BINARY, 0, 0 },
{ LANG_GOBLIN_BINARY, 0, 0 }
};
LanguageDesc const* GetLanguageDescByID(uint32 lang)
{
for(int i = 0; i < LANGUAGES_COUNT; ++i)
{
if(uint32(lang_description[i].lang_id) == lang)
return &lang_description[i];
}
return NULL;
}
LanguageDesc const* GetLanguageDescBySpell(uint32 spell_id)
{
for(int i = 0; i < LANGUAGES_COUNT; ++i)
{
if(lang_description[i].spell_id == spell_id)
return &lang_description[i];
}
return NULL;
}
LanguageDesc const* GetLanguageDescBySkill(uint32 skill_id)
{
for(int i = 0; i < LANGUAGES_COUNT; ++i)
{
if(lang_description[i].skill_id == skill_id)
return &lang_description[i];
}
return NULL;
}
ChatCommand * ChatHandler::getCommandTable()
{
static ChatCommand serverCommandTable[] =
-13
View File
@@ -28,19 +28,6 @@ class Player;
class Unit;
struct GameTele;
struct LanguageDesc
{
Language lang_id;
uint32 spell_id;
uint32 skill_id;
};
extern LanguageDesc lang_description[LANGUAGES_COUNT];
LanguageDesc const* GetLanguageDescByID(uint32 lang);
LanguageDesc const* GetLanguageDescBySpell(uint32 spell_id);
LanguageDesc const* GetLanguageDescBySkill(uint32 skill_id);
class ChatCommand
{
public:
+124 -31
View File
@@ -62,15 +62,36 @@ TrainerSpell const* TrainerSpellData::Find(uint32 spell_id) const
return NULL;
}
bool VendorItemData::RemoveItem( uint32 item_id )
{
for(VendorItemList::iterator i = m_items.begin(); i != m_items.end(); ++i )
{
if((*i)->item==item_id)
{
m_items.erase(i);
return true;
}
}
return false;
}
VendorItem const* VendorItemData::FindItem(uint32 item_id) const
{
for(VendorItemList::const_iterator i = m_items.begin(); i != m_items.end(); ++i )
if((*i)->item==item_id)
return *i;
return NULL;
}
Creature::Creature() :
Unit(), i_AI(NULL),
lootForPickPocketed(false), lootForBody(false), m_groupLootTimer(0), lootingGroupLeaderGUID(0),
m_itemsLoaded(false), m_lootMoney(0), m_lootRecipient(0),
m_lootMoney(0), m_lootRecipient(0),
m_deathTimer(0), m_respawnTime(0), m_respawnDelay(25), m_corpseDelay(60), m_respawnradius(0.0f),
m_gossipOptionLoaded(false),m_emoteState(0), m_isPet(false), m_isTotem(false),
m_regenTimer(2000), m_defaultMovementType(IDLE_MOTION_TYPE), m_equipmentId(0),
m_AlreadyCallAssistence(false), m_regenHealth(true), m_AI_locked(false), m_isDeadByDefault(false),
m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL)
m_meleeDamageSchoolMask(SPELL_SCHOOL_MASK_NORMAL),m_creatureInfo(NULL), m_DBTableGuid(0)
{
m_valuesCount = UNIT_END;
@@ -87,7 +108,7 @@ Creature::~Creature()
{
CleanupsBeforeDelete();
m_vendor_items.clear();
m_vendorItemCounts.clear();
delete i_AI;
i_AI = NULL;
@@ -503,6 +524,7 @@ bool Creature::Create (uint32 guidlow, Map *map, uint32 Entry, uint32 team, cons
m_corpseDelay = sWorld.getConfig(CONFIG_CORPSE_DECAY_NORMAL);
break;
}
LoadCreaturesAddon();
}
return bResult;
@@ -673,16 +695,16 @@ void Creature::prepareGossipMenu( Player *pPlayer,uint32 gossipid )
cantalking=false;
break;
case GOSSIP_OPTION_VENDOR:
// load vendor items if not yet
LoadGoods();
if(!GetItemCount())
{
VendorItemData const* vItems = GetVendorItems();
if(!vItems || vItems->Empty())
{
sLog.outErrorDb("Creature %u (Entry: %u) have UNIT_NPC_FLAG_VENDOR but have empty trading item list.",
GetGUIDLow(),GetEntry());
cantalking=false;
}
break;
}
case GOSSIP_OPTION_TRAINER:
if(!isCanTrainingOf(pPlayer,false))
cantalking=false;
@@ -934,6 +956,9 @@ uint32 Creature::GetGossipTextId(uint32 action, uint32 zoneid)
uint32 Creature::GetNpcTextId()
{
if (!m_DBTableGuid)
return DEFAULT_GOSSIP_MESSAGE;
if(uint32 pos = objmgr.GetNpcGossip(m_DBTableGuid))
return pos;
@@ -1046,6 +1071,8 @@ void Creature::SaveToDB()
void Creature::SaveToDB(uint32 mapid, uint8 spawnMask)
{
// update in loaded data
if (!m_DBTableGuid)
m_DBTableGuid = GetGUIDLow();
CreatureData& data = objmgr.NewOrExistCreatureData(m_DBTableGuid);
uint32 displayId = GetNativeDisplayId();
@@ -1237,7 +1264,6 @@ bool Creature::CreateFromProto(uint32 guidlow, uint32 Entry, uint32 team, const
Object::_Create(guidlow, Entry, HIGHGUID_UNIT);
m_DBTableGuid = guidlow;
if(!UpdateEntry(Entry, team, data))
return false;
@@ -1263,7 +1289,7 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
return false;
}
uint32 stored_guid = guid;
m_DBTableGuid = guid;
if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_UNIT);
uint16 team = 0;
@@ -1278,9 +1304,6 @@ bool Creature::LoadFromDB(uint32 guid, Map *map)
return false;
}
m_DBTableGuid = stored_guid;
LoadCreaturesAddon();
m_respawnradius = data->spawndist;
m_respawnDelay = data->spawntimesecs;
@@ -1346,24 +1369,6 @@ void Creature::LoadEquipment(uint32 equip_entry, bool force)
}
}
void Creature::LoadGoods()
{
// already loaded;
if(m_itemsLoaded)
return;
m_vendor_items.clear();
VendorItemList const* vList = objmgr.GetNpcVendorItemList(GetEntry());
if(!vList)
return;
for (VendorItemList::const_iterator _item_iter = vList->begin(); _item_iter != vList->end(); ++_item_iter)
AddItem( (*_item_iter)->item, (*_item_iter)->maxcount, (*_item_iter)->incrtime, (*_item_iter)->ExtendedCost);
m_itemsLoaded = true;
}
bool Creature::hasQuest(uint32 quest_id) const
{
QuestRelations const& qr = objmgr.mCreatureQuestRelations;
@@ -1388,6 +1393,12 @@ bool Creature::hasInvolvedQuest(uint32 quest_id) const
void Creature::DeleteFromDB()
{
if (!m_DBTableGuid)
{
sLog.outDebug("Trying to delete not saved creature!");
return;
}
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
objmgr.DeleteCreatureData(m_DBTableGuid);
@@ -1494,6 +1505,7 @@ void Creature::Respawn()
if(getDeathState()==DEAD)
{
if (m_DBTableGuid)
objmgr.SaveCreatureRespawnTime(m_DBTableGuid,GetInstanceId(),0);
m_respawnTime = time(NULL); // respawn at next tick
}
@@ -1716,7 +1728,7 @@ void Creature::CallAssistence()
void Creature::SaveRespawnTime()
{
if(isPet())
if(isPet() || !m_DBTableGuid)
return;
if(m_respawnTime > time(NULL)) // dead (no corpse)
@@ -1751,9 +1763,12 @@ bool Creature::IsOutOfThreatArea(Unit* pVictim) const
}
CreatureDataAddon const* Creature::GetCreatureAddon() const
{
if (m_DBTableGuid)
{
if(CreatureDataAddon const* addon = ObjectMgr::GetCreatureAddon(m_DBTableGuid))
return addon;
}
// dependent from heroic mode entry
return ObjectMgr::GetCreatureTemplateAddon(GetCreatureInfo()->Entry);
@@ -1956,6 +1971,84 @@ char const* Creature::GetScriptName() const
return ObjectMgr::GetCreatureTemplate(GetEntry())->ScriptName;
}
VendorItemData const* Creature::GetVendorItems() const
{
return objmgr.GetNpcVendorItemList(GetEntry());
}
uint32 Creature::GetVendorItemCurrentCount(VendorItem const* vItem)
{
if(!vItem->maxcount)
return vItem->maxcount;
VendorItemCounts::iterator itr = m_vendorItemCounts.begin();
for(; itr != m_vendorItemCounts.end(); ++itr)
if(itr->itemId==vItem->item)
break;
if(itr == m_vendorItemCounts.end())
return vItem->maxcount;
VendorItemCount* vCount = &*itr;
time_t ptime = time(NULL);
if( vCount->lastIncrementTime + vItem->incrtime <= ptime )
{
ItemPrototype const* pProto = objmgr.GetItemPrototype(vItem->item);
uint32 diff = uint32((ptime - vCount->lastIncrementTime)/vItem->incrtime);
if((vCount->count + diff * pProto->BuyCount) >= vItem->maxcount )
{
m_vendorItemCounts.erase(itr);
return vItem->maxcount;
}
vCount->count += diff * pProto->BuyCount;
vCount->lastIncrementTime = ptime;
}
return vCount->count;
}
uint32 Creature::UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 used_count)
{
if(!vItem->maxcount)
return 0;
VendorItemCounts::iterator itr = m_vendorItemCounts.begin();
for(; itr != m_vendorItemCounts.end(); ++itr)
if(itr->itemId==vItem->item)
break;
if(itr == m_vendorItemCounts.end())
{
uint32 new_count = vItem->maxcount > used_count ? vItem->maxcount-used_count : 0;
m_vendorItemCounts.push_back(VendorItemCount(vItem->item,new_count));
return new_count;
}
VendorItemCount* vCount = &*itr;
time_t ptime = time(NULL);
if( vCount->lastIncrementTime + vItem->incrtime <= ptime )
{
ItemPrototype const* pProto = objmgr.GetItemPrototype(vItem->item);
uint32 diff = uint32((ptime - vCount->lastIncrementTime)/vItem->incrtime);
if((vCount->count + diff * pProto->BuyCount) < vItem->maxcount )
vCount->count += diff * pProto->BuyCount;
else
vCount->count = vItem->maxcount;
}
vCount->count = vCount->count > used_count ? vCount->count-used_count : 0;
vCount->lastIncrementTime = ptime;
return vCount->count;
}
TrainerSpellData const* Creature::GetTrainerSpells() const
{
return objmgr.GetNpcTrainerSpells(GetEntry());
+55 -52
View File
@@ -112,19 +112,6 @@ struct GossipOption
std::string Option;
};
struct CreatureItem
{
CreatureItem(uint32 _item, uint32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
: id(_item), count(_maxcount), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost), lastincr((uint32)time(NULL)) {}
uint32 id;
uint32 count;
uint32 maxcount;
uint32 incrtime;
uint32 lastincr;
uint32 ExtendedCost;
};
enum CreatureFlagsExtra
{
CREATURE_FLAG_EXTRA_INSTANCE_BIND = 0x00000001, // creature kill bind instance with killer and killer's group
@@ -291,6 +278,56 @@ enum InhabitTypeValues
#pragma pack(pop)
#endif
// Vendors
struct VendorItem
{
VendorItem(uint32 _item, uint32 _maxcount, uint32 _incrtime, uint32 _ExtendedCost)
: item(_item), maxcount(_maxcount), incrtime(_incrtime), ExtendedCost(_ExtendedCost) {}
uint32 item;
uint32 maxcount; // 0 for infinity item amount
uint32 incrtime; // time for restore items amount if maxcount != 0
uint32 ExtendedCost;
};
typedef std::vector<VendorItem*> VendorItemList;
struct VendorItemData
{
VendorItemList m_items;
VendorItem* GetItem(uint32 slot) const
{
if(slot>=m_items.size()) return NULL;
return m_items[slot];
}
bool Empty() const { return m_items.empty(); }
uint8 GetItemCount() const { return m_items.size(); }
void AddItem( uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost)
{
m_items.push_back(new VendorItem(item, maxcount, ptime, ExtendedCost));
}
bool RemoveItem( uint32 item_id );
VendorItem const* FindItem(uint32 item_id) const;
void Clear()
{
for (VendorItemList::iterator itr = m_items.begin(); itr != m_items.end(); ++itr)
delete (*itr);
}
};
struct VendorItemCount
{
explicit VendorItemCount(uint32 _item, uint32 _count)
: itemId(_item), count(_count), lastIncrementTime(time(NULL)) {}
uint32 itemId;
uint32 count;
time_t lastIncrementTime;
};
typedef std::list<VendorItemCount> VendorItemCounts;
struct TrainerSpell
{
uint32 spell;
@@ -418,41 +455,9 @@ class MANGOS_DLL_SPEC Creature : public Unit
uint32 GetCurrentEquipmentId() { return m_equipmentId; }
float GetSpellDamageMod(int32 Rank);
/*********************************************************/
/*** VENDOR SYSTEM ***/
/*********************************************************/
void LoadGoods(); // must be called before access to vendor items, lazy loading at first call
void ReloadGoods() { m_itemsLoaded = false; LoadGoods(); }
CreatureItem* GetItem(uint32 slot)
{
if(slot>=m_vendor_items.size()) return NULL;
return &m_vendor_items[slot];
}
uint8 GetItemCount() const { return m_vendor_items.size(); }
void AddItem( uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost)
{
m_vendor_items.push_back(CreatureItem(item, maxcount, ptime, ExtendedCost));
}
bool RemoveItem( uint32 item_id )
{
for(CreatureItems::iterator i = m_vendor_items.begin(); i != m_vendor_items.end(); ++i )
{
if(i->id==item_id)
{
m_vendor_items.erase(i);
return true;
}
}
return false;
}
CreatureItem* FindItem(uint32 item_id)
{
for(CreatureItems::iterator i = m_vendor_items.begin(); i != m_vendor_items.end(); ++i )
if(i->id==item_id)
return &*i;
return NULL;
}
VendorItemData const* GetVendorItems() const;
uint32 GetVendorItemCurrentCount(VendorItem const* vItem);
uint32 UpdateVendorItemCurrentCount(VendorItem const* vItem, uint32 used_count);
TrainerSpellData const* GetTrainerSpells() const;
@@ -562,9 +567,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
bool InitEntry(uint32 entry, uint32 team=ALLIANCE, const CreatureData* data=NULL);
// vendor items
typedef std::vector<CreatureItem> CreatureItems;
CreatureItems m_vendor_items;
bool m_itemsLoaded; // vendor items loading state
VendorItemCounts m_vendorItemCounts;
void _RealtimeSetCreatureInfo();
@@ -592,7 +595,7 @@ class MANGOS_DLL_SPEC Creature : public Unit
uint32 m_regenTimer;
MovementGeneratorType m_defaultMovementType;
Cell m_currentCell; // store current cell where creature listed
uint32 m_DBTableGuid;
uint32 m_DBTableGuid; ///< For new or temporary creatures is 0 for saved it is lowguid
uint32 m_equipmentId;
bool m_AlreadyCallAssistence;
+11 -17
View File
@@ -54,6 +54,8 @@ GameObject::GameObject() : WorldObject()
m_charges = 5;
m_cooldownTime = 0;
m_goInfo = NULL;
m_DBTableGuid = 0;
}
GameObject::~GameObject()
@@ -108,7 +110,6 @@ bool GameObject::Create(uint32 guidlow, uint32 name_id, Map *map, float x, float
Object::_Create(guidlow, goinfo->id, HIGHGUID_GAMEOBJECT);
m_DBTableGuid = guidlow;
m_goInfo = goinfo;
if (goinfo->type >= MAX_GAMEOBJECT_TYPE)
@@ -478,7 +479,7 @@ void GameObject::getFishLoot(Loot *fishloot)
void GameObject::SaveToDB()
{
// this should only be used when the creature has already been loaded
// this should only be used when the gameobject has already been loaded
// perferably after adding to map, because mapid may not be valid otherwise
GameObjectData const *data = objmgr.GetGOData(m_DBTableGuid);
if(!data)
@@ -497,6 +498,8 @@ void GameObject::SaveToDB(uint32 mapid, uint8 spawnMask)
if (!goI)
return;
if (!m_DBTableGuid)
m_DBTableGuid = GetGUIDLow();
// update in loaded data (changing data only in this place)
GameObjectData& data = objmgr.NewGOData(m_DBTableGuid);
@@ -566,14 +569,12 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
uint32 animprogress = data->animprogress;
uint32 go_state = data->go_state;
uint32 stored_guid = guid;
m_DBTableGuid = guid;
if (map->GetInstanceId() != 0) guid = objmgr.GenerateLowGuid(HIGHGUID_GAMEOBJECT);
if (!Create(guid,entry, map, x, y, z, ang, rotation0, rotation1, rotation2, rotation3, animprogress, go_state) )
return false;
m_DBTableGuid = stored_guid;
switch(GetGOInfo()->type)
{
case GAMEOBJECT_TYPE_DOOR:
@@ -589,7 +590,7 @@ bool GameObject::LoadFromDB(uint32 guid, Map *map)
{
m_spawnedByDefault = true;
m_respawnDelayTime = data->spawntimesecs;
m_respawnTime = objmgr.GetGORespawnTime(stored_guid, map->GetInstanceId());
m_respawnTime = objmgr.GetGORespawnTime(m_DBTableGuid, map->GetInstanceId());
// ready to respawn
if(m_respawnTime && m_respawnTime <= time(NULL))
@@ -1158,12 +1159,9 @@ void GameObject::Use(Unit* user)
Player* player = (Player*)user;
if( player->InBattleGround() && // in battleground
!player->IsMounted() && // not mounted
!player->HasStealthAura() && // not stealthed
!player->HasInvisibilityAura() && // not invisible
player->isAlive()) // live player
if( player->isAllowUseBattleGroundObject() )
{
// in battleground check
BattleGround *bg = player->GetBattleGround();
if(!bg)
return;
@@ -1186,13 +1184,9 @@ void GameObject::Use(Unit* user)
Player* player = (Player*)user;
if( player->InBattleGround() && // in battleground
!player->IsMounted() && // not mounted
!player->HasStealthAura() && // not stealthed
!player->HasInvisibilityAura() && // not invisible
!player->HasAura(SPELL_RECENTLY_DROPPED_FLAG, 0) && // can't pickup
player->isAlive()) // live player
if( player->isAllowUseBattleGroundObject() )
{
// in battleground check
BattleGround *bg = player->GetBattleGround();
if(!bg)
return;
+1 -1
View File
@@ -582,7 +582,7 @@ class MANGOS_DLL_SPEC GameObject : public WorldObject
std::set<uint32> m_unique_users;
uint32 m_usetimes;
uint32 m_DBTableGuid;
uint32 m_DBTableGuid; ///< For new or temporary gameobjects is 0 for saved it is lowguid
GameObjectInfo const* m_goInfo;
private:
void SwitchDoorOrButton(bool activate);
+6 -6
View File
@@ -391,7 +391,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 )
@@ -477,7 +477,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 )
@@ -515,7 +515,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
WorldPacket data( SMSG_QUEST_QUERY_RESPONSE, 100 ); // guess size
data << uint32(pQuest->GetQuestId());
data << uint32(pQuest->GetMinLevel()); // not MinLevel. Accepted values: 0, 1 or 2 Possible theory for future dev: 0==cannot in quest log, 1==can in quest log session only(removed on log out), 2==can in quest log always (save to db)
data << uint32(pQuest->GetQuestMethod()); // Accepted values: 0, 1 or 2. 0==IsAutoComplete() (skip objectives/details)
data << uint32(pQuest->GetQuestLevel()); // may be 0
data << uint32(pQuest->GetZoneOrSort()); // zone or sort to display in quest log
@@ -597,7 +597,7 @@ void PlayerMenu::SendQuestQueryResponse( Quest const *pQuest )
data << ObjectiveText[iI];
pSession->SendPacket( &data );
//sLog.outDebug( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u",pQuest->GetQuestId() );
sLog.outDebug( "WORLD: Sent SMSG_QUEST_QUERY_RESPONSE questid=%u",pQuest->GetQuestId() );
}
void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID, bool EnbleNext )
@@ -679,7 +679,7 @@ void PlayerMenu::SendQuestGiverOfferReward( Quest const* pQuest, uint64 npcGUID,
data << uint32(pQuest->GetRewSpellCast()); // casted spell
data << uint32(0); // Honor points reward, not implemented
pSession->SendPacket( &data );
//sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
sLog.outDebug( "WORLD: Sent SMSG_QUESTGIVER_OFFER_REWARD NPCGuid=%u, questid=%u",GUID_LOPART(npcGUID),pQuest->GetQuestId() );
}
void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID, bool Completable, bool CloseOnCancel )
@@ -758,5 +758,5 @@ void PlayerMenu::SendQuestGiverRequestItems( Quest const *pQuest, uint64 npcGUID
data << uint32(0x04) << uint32(0x08) << 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() );
}
+16 -26
View File
@@ -680,13 +680,16 @@ void WorldSession::SendListInventory( uint64 vendorguid )
// Stop the npc if moving
pCreature->StopMoving();
// load vendor items if not yet
pCreature->LoadGoods();
uint8 numitems = pCreature->GetItemCount();
VendorItemData const* vItems = pCreature->GetVendorItems();
if(!vItems)
{
_player->SendSellError( SELL_ERR_CANT_FIND_VENDOR, NULL, 0, 0);
return;
}
uint8 numitems = vItems->GetItemCount();
uint8 count = 0;
uint32 ptime = time(NULL);
uint32 diff;
WorldPacket data( SMSG_LIST_INVENTORY, (8+1+numitems*8*4) );
data << uint64(vendorguid);
@@ -694,37 +697,24 @@ void WorldSession::SendListInventory( uint64 vendorguid )
float discountMod = _player->GetReputationPriceDiscount(pCreature);
ItemPrototype const *pProto;
for(int i = 0; i < numitems; i++ )
{
CreatureItem* crItem = pCreature->GetItem(i);
if( crItem )
if(VendorItem const* crItem = vItems->GetItem(i))
{
pProto = objmgr.GetItemPrototype(crItem->id);
if( pProto )
if(ItemPrototype const *pProto = objmgr.GetItemPrototype(crItem->item))
{
if((pProto->AllowableClass & _player->getClassMask()) == 0 && pProto->Bonding == BIND_WHEN_PICKED_UP && !_player->isGameMaster())
continue;
++count;
if( crItem->incrtime != 0 && (crItem->lastincr + crItem->incrtime <= ptime) )
{
diff = uint32((ptime - crItem->lastincr)/crItem->incrtime);
if( (crItem->count + diff * pProto->BuyCount) <= crItem->maxcount )
crItem->count += diff * pProto->BuyCount;
else
crItem->count = crItem->maxcount;
crItem->lastincr = ptime;
}
data << uint32(count);
data << uint32(crItem->id);
data << uint32(pProto->DisplayInfoID);
data << uint32(crItem->maxcount <= 0 ? 0xFFFFFFFF : crItem->count);
uint32 price = pProto->BuyPrice;
++count;
// reputation discount
price = uint32(floor(pProto->BuyPrice * discountMod));
uint32 price = uint32(floor(pProto->BuyPrice * discountMod));
data << uint32(count);
data << uint32(crItem->item);
data << uint32(pProto->DisplayInfoID);
data << uint32(crItem->maxcount <= 0 ? 0xFFFFFFFF : pCreature->GetVendorItemCurrentCount(crItem));
data << uint32(price);
data << uint32(pProto->MaxDurability);
data << uint32(pProto->BuyCount);
+1
View File
@@ -303,6 +303,7 @@ enum MangosStrings
LANG_LOOKUP_PLAYER_ACCOUNT = 328,
LANG_LOOKUP_PLAYER_CHARACTER = 329,
LANG_NO_PLAYERS_FOUND = 330,
LANG_EXTENDED_COST_NOT_EXIST = 331,
// Room for more level 2
+16 -53
View File
@@ -1237,14 +1237,6 @@ bool ChatHandler::HandleAddVendorItemCommand(const char* args)
if (!*args)
return false;
Creature* vendor = getSelectedCreature();
if (!vendor || !vendor->isVendor())
{
SendSysMessage(LANG_COMMAND_VENDORSELECTION);
SetSentErrorMessage(true);
return false;
}
char* pitem = extractKeyFromLink((char*)args,"Hitem");
if (!pitem)
{
@@ -1252,6 +1244,7 @@ bool ChatHandler::HandleAddVendorItemCommand(const char* args)
SetSentErrorMessage(true);
return false;
}
uint32 itemId = atol(pitem);
char* fmaxcount = strtok(NULL, " "); //add maxcount, default: 0
@@ -1267,41 +1260,20 @@ bool ChatHandler::HandleAddVendorItemCommand(const char* args)
char* fextendedcost = strtok(NULL, " "); //add ExtendedCost, default: 0
uint32 extendedcost = fextendedcost ? atol(fextendedcost) : 0;
Creature* vendor = getSelectedCreature();
uint32 vendor_entry = vendor ? vendor->GetEntry() : 0;
if(!objmgr.IsVendorItemValid(vendor_entry,itemId,maxcount,incrtime,extendedcost,m_session->GetPlayer()))
{
SetSentErrorMessage(true);
return false;
}
objmgr.AddVendorItem(vendor_entry,itemId,maxcount,incrtime,extendedcost);
ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
if(!pProto)
{
PSendSysMessage(LANG_ITEM_NOT_FOUND, itemId);
SetSentErrorMessage(true);
return false;
}
if(extendedcost && !sItemExtendedCostStore.LookupEntry(extendedcost))
{
PSendSysMessage(LANG_BAD_VALUE, extendedcost);
SetSentErrorMessage(true);
return false;
}
// load vendor items if not yet
vendor->LoadGoods();
if(vendor->FindItem(itemId))
{
PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST,itemId);
SetSentErrorMessage(true);
return false;
}
if (vendor->GetItemCount() >= MAX_VENDOR_ITEMS)
{
SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
SetSentErrorMessage(true);
return false;
}
// add to DB and to current ingame vendor
WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%u')",vendor->GetEntry(), itemId, maxcount,incrtime,extendedcost);
vendor->AddItem(itemId,maxcount,incrtime,extendedcost);
PSendSysMessage(LANG_ITEM_ADDED_TO_LIST,itemId,pProto->Name1,maxcount,incrtime,extendedcost);
return true;
}
@@ -1329,25 +1301,16 @@ bool ChatHandler::HandleDelVendorItemCommand(const char* args)
}
uint32 itemId = atol(pitem);
ItemPrototype const *pProto = objmgr.GetItemPrototype(itemId);
if(!pProto)
{
PSendSysMessage(LANG_ITEM_NOT_FOUND, itemId);
SetSentErrorMessage(true);
return false;
}
// load vendor items if not yet
vendor->LoadGoods();
if (!vendor->RemoveItem(itemId))
if(!objmgr.RemoveVendorItem(vendor->GetEntry(),itemId))
{
PSendSysMessage(LANG_ITEM_NOT_IN_LIST,itemId);
SetSentErrorMessage(true);
return false;
}
WorldDatabase.PExecuteLog("DELETE FROM npc_vendor WHERE entry='%u' AND item='%u'",vendor->GetEntry(), itemId);
ItemPrototype const* pProto = objmgr.GetItemPrototype(itemId);
PSendSysMessage(LANG_ITEM_DELETED_FROM_LIST,itemId,pProto->Name1);
return true;
}
+185 -64
View File
@@ -70,6 +70,40 @@ bool normalizePlayerName(std::string& name)
return true;
}
LanguageDesc lang_description[LANGUAGES_COUNT] =
{
{ LANG_ADDON, 0, 0 },
{ LANG_UNIVERSAL, 0, 0 },
{ LANG_ORCISH, 669, SKILL_LANG_ORCISH },
{ LANG_DARNASSIAN, 671, SKILL_LANG_DARNASSIAN },
{ LANG_TAURAHE, 670, SKILL_LANG_TAURAHE },
{ LANG_DWARVISH, 672, SKILL_LANG_DWARVEN },
{ LANG_COMMON, 668, SKILL_LANG_COMMON },
{ LANG_DEMONIC, 815, SKILL_LANG_DEMON_TONGUE },
{ LANG_TITAN, 816, SKILL_LANG_TITAN },
{ LANG_THALASSIAN, 813, SKILL_LANG_THALASSIAN },
{ LANG_DRACONIC, 814, SKILL_LANG_DRACONIC },
{ LANG_KALIMAG, 817, SKILL_LANG_OLD_TONGUE },
{ LANG_GNOMISH, 7340, SKILL_LANG_GNOMISH },
{ LANG_TROLL, 7341, SKILL_LANG_TROLL },
{ LANG_GUTTERSPEAK, 17737, SKILL_LANG_GUTTERSPEAK },
{ LANG_DRAENEI, 29932, SKILL_LANG_DRAENEI },
{ LANG_ZOMBIE, 0, 0 },
{ LANG_GNOMISH_BINARY, 0, 0 },
{ LANG_GOBLIN_BINARY, 0, 0 }
};
LanguageDesc const* GetLanguageDescByID(uint32 lang)
{
for(int i = 0; i < LANGUAGES_COUNT; ++i)
{
if(uint32(lang_description[i].lang_id) == lang)
return &lang_description[i];
}
return NULL;
}
ObjectMgr::ObjectMgr()
{
m_hiCharGuid = 1;
@@ -134,8 +168,7 @@ ObjectMgr::~ObjectMgr()
delete itr->second;
for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
for (VendorItemList::iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
delete (*itr2);
itr->second.Clear();
for (CacheTrainerSpellMap::iterator itr = m_mCacheTrainerSpellMap.begin(); itr != m_mCacheTrainerSpellMap.end(); ++itr)
itr->second.Clear();
@@ -2697,35 +2730,35 @@ void ObjectMgr::LoadQuests()
mExclusiveQuestGroups.clear();
// 0 1 2 3 4 5 6 7
QueryResult *result = WorldDatabase.Query("SELECT entry, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue,"
// 8 9 10 11 12 13 14 15
// 0 1 2 3 4 5 6 7 8
QueryResult *result = WorldDatabase.Query("SELECT entry, Method, ZoneOrSort, SkillOrClass, MinLevel, QuestLevel, Type, RequiredRaces, RequiredSkillValue,"
// 9 10 11 12 13 14 15 16
"RepObjectiveFaction, RepObjectiveValue, RequiredMinRepFaction, RequiredMinRepValue, RequiredMaxRepFaction, RequiredMaxRepValue, SuggestedPlayers, LimitTime,"
// 16 17 18 19 20 21 22 23 24 25
// 17 18 19 20 21 22 23 24 25 26
"QuestFlags, SpecialFlags, CharTitleId, PrevQuestId, NextQuestId, ExclusiveGroup, NextQuestInChain, SrcItemId, SrcItemCount, SrcSpell,"
// 26 27 28 29 30 31 32 33 34 35
// 27 28 29 30 31 32 33 34 35 36
"Title, Details, Objectives, OfferRewardText, RequestItemsText, EndText, ObjectiveText1, ObjectiveText2, ObjectiveText3, ObjectiveText4,"
// 36 37 38 39 40 41 42 43
// 37 38 39 40 41 42 43 44
"ReqItemId1, ReqItemId2, ReqItemId3, ReqItemId4, ReqItemCount1, ReqItemCount2, ReqItemCount3, ReqItemCount4,"
// 44 45 46 47 48 49 50 51 52 53 54 55
// 45 46 47 48 49 50 51 52 53 54 54 55
"ReqSourceId1, ReqSourceId2, ReqSourceId3, ReqSourceId4, ReqSourceCount1, ReqSourceCount2, ReqSourceCount3, ReqSourceCount4, ReqSourceRef1, ReqSourceRef2, ReqSourceRef3, ReqSourceRef4,"
// 56 57 58 59 60 61 62 63
// 57 58 59 60 61 62 63 64
"ReqCreatureOrGOId1, ReqCreatureOrGOId2, ReqCreatureOrGOId3, ReqCreatureOrGOId4, ReqCreatureOrGOCount1, ReqCreatureOrGOCount2, ReqCreatureOrGOCount3, ReqCreatureOrGOCount4,"
// 64 65 66 67
// 65 66 67 68
"ReqSpellCast1, ReqSpellCast2, ReqSpellCast3, ReqSpellCast4,"
// 68 69 70 71 72 73
// 69 70 71 72 73 74
"RewChoiceItemId1, RewChoiceItemId2, RewChoiceItemId3, RewChoiceItemId4, RewChoiceItemId5, RewChoiceItemId6,"
// 74 75 76 77 78 79
// 75 76 77 78 79 80
"RewChoiceItemCount1, RewChoiceItemCount2, RewChoiceItemCount3, RewChoiceItemCount4, RewChoiceItemCount5, RewChoiceItemCount6,"
// 80 81 82 83 84 85 86 87
// 81 82 83 84 85 86 87 88
"RewItemId1, RewItemId2, RewItemId3, RewItemId4, RewItemCount1, RewItemCount2, RewItemCount3, RewItemCount4,"
// 88 89 90 91 92 93 94 95 96 97
// 89 90 91 92 93 94 95 96 97 98
"RewRepFaction1, RewRepFaction2, RewRepFaction3, RewRepFaction4, RewRepFaction5, RewRepValue1, RewRepValue2, RewRepValue3, RewRepValue4, RewRepValue5,"
// 98 99 100 101 102 103 104 105 106 107
// 99 100 101 102 103 104 105 106 107 108
"RewOrReqMoney, RewMoneyMaxLevel, RewSpell, RewSpellCast, RewMailTemplateId, RewMailDelaySecs, PointMapId, PointX, PointY, PointOpt,"
// 108 109 110 111 112 113 114 115 116 117
// 109 110 111 112 113 114 115 116 117 118
"DetailsEmote1, DetailsEmote2, DetailsEmote3, DetailsEmote4,IncompleteEmote, CompleteEmote, OfferRewardEmote1, OfferRewardEmote2, OfferRewardEmote3, OfferRewardEmote4,"
// 118 119
// 119 120
"StartScript, CompleteScript"
" FROM quest_template");
if(result == NULL)
@@ -2761,6 +2794,11 @@ void ObjectMgr::LoadQuests()
// additional quest integrity checks (GO, creature_template and item_template must be loaded already)
if( qinfo->GetQuestMethod() >= 3 )
{
sLog.outErrorDb("Quest %u has `Method` = %u, expected values are 0, 1 or 2.",qinfo->GetQuestId(),qinfo->GetQuestMethod());
}
if (qinfo->QuestFlags & ~QUEST_MANGOS_FLAGS_DB_ALLOWED)
{
sLog.outErrorDb("Quest %u has `SpecialFlags` = %u > max allowed value. Correct `SpecialFlags` to value <= %u",
@@ -6148,14 +6186,14 @@ bool ObjectMgr::LoadMangosStrings(DatabaseType& db, char const* table, int32 min
if(entry==0)
{
sLog.outString("Table `%s` contain reserved entry 0, ignored.",table);
sLog.outErrorDb("Table `%s` contain reserved entry 0, ignored.",table);
continue;
}
else if(entry < min_value || entry > max_value)
{
int32 start = min_value > 0 ? min_value : max_value;
int32 end = min_value > 0 ? max_value : min_value;
sLog.outString("Table `%s` contain entry %i out of allowed range (%d - %d), ignored.",table,entry,start,end);
sLog.outErrorDb("Table `%s` contain entry %i out of allowed range (%d - %d), ignored.",table,entry,start,end);
continue;
}
@@ -6163,7 +6201,7 @@ bool ObjectMgr::LoadMangosStrings(DatabaseType& db, char const* table, int32 min
if(data.Content.size() > 0)
{
sLog.outString("Table `%s` contain data for already loaded entry %i (from another table?), ignored.",table,entry);
sLog.outErrorDb("Table `%s` contain data for already loaded entry %i (from another table?), ignored.",table,entry);
continue;
}
@@ -6656,22 +6694,30 @@ void ObjectMgr::LoadTrainerSpell()
barGoLink bar( result->GetRowCount() );
uint32 count = 0,entry,spell;
uint32 count = 0;
do
{
bar.step();
Field* fields = result->Fetch();
entry = fields[0].GetUInt32();
spell = fields[1].GetUInt32();
uint32 entry = fields[0].GetUInt32();
uint32 spell = fields[1].GetUInt32();
if(!GetCreatureTemplate(entry))
CreatureInfo const* cInfo = GetCreatureTemplate(entry);
if(!cInfo)
{
sLog.outErrorDb("Table `npc_trainer` have entry for not existed creature template (Entry: %u), ignore", entry);
continue;
}
if(!(cInfo->npcflag & UNIT_NPC_FLAG_TRAINER))
{
sLog.outErrorDb("Table `npc_trainer` have data for not creature template (Entry: %u) without trainer flag, ignore", entry);
continue;
}
SpellEntry const *spellinfo = sSpellStore.LookupEntry(spell);
if(!spellinfo)
{
@@ -6715,10 +6761,7 @@ void ObjectMgr::LoadVendors()
{
// For reload case
for (CacheVendorItemMap::iterator itr = m_mCacheVendorItemMap.begin(); itr != m_mCacheVendorItemMap.end(); ++itr)
{
for (VendorItemList::iterator itr2 = itr->second.begin(); itr2 != itr->second.end(); ++itr2)
delete (*itr2);
}
itr->second.Clear();
m_mCacheVendorItemMap.clear();
QueryResult *result = WorldDatabase.PQuery("SELECT entry, item, maxcount, incrtime, ExtendedCost FROM npc_vendor");
@@ -6736,48 +6779,23 @@ void ObjectMgr::LoadVendors()
barGoLink bar( result->GetRowCount() );
uint32 count = 0;
uint32 entry, item_id, ExtendedCost;
do
{
bar.step();
Field* fields = result->Fetch();
entry = fields[0].GetUInt32();
if(!GetCreatureTemplate(entry))
{
sLog.outErrorDb("Table `npc_vendor` have data for not existed creature template (Entry: %u), ignore", entry);
uint32 entry = fields[0].GetUInt32();
uint32 item_id = fields[1].GetUInt32();
uint32 maxcount = fields[2].GetUInt32();
uint32 incrtime = fields[3].GetUInt32();
uint32 ExtendedCost = fields[4].GetUInt32();
if(!IsVendorItemValid(entry,item_id,maxcount,incrtime,ExtendedCost))
continue;
}
item_id = fields[1].GetUInt32();
if(!GetItemPrototype(item_id))
{
sLog.outErrorDb("Table `npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore",entry,item_id);
continue;
}
VendorItemData& vList = m_mCacheVendorItemMap[entry];
ExtendedCost = fields[4].GetUInt32();
if(ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
{
sLog.outErrorDb("Table `npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,ExtendedCost,entry);
continue;
}
VendorItemList& vList = m_mCacheVendorItemMap[entry];
if(vList.size() >= MAX_VENDOR_ITEMS)
{
sLog.outErrorDb( "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vList.size(), MAX_VENDOR_ITEMS, entry);
continue;
}
VendorItem* pVendorItem = new VendorItem();
pVendorItem->item = item_id;
pVendorItem->maxcount = fields[2].GetUInt32();
pVendorItem->incrtime = fields[3].GetUInt32();
pVendorItem->ExtendedCost = ExtendedCost;
vList.push_back(pVendorItem);
vList.AddItem(item_id,maxcount,incrtime,ExtendedCost);
++count;
} while (result->NextRow());
@@ -6838,6 +6856,109 @@ void ObjectMgr::LoadNpcTextId()
sLog.outString( ">> Loaded %d NpcTextId ", count );
}
void ObjectMgr::AddVendorItem( uint32 entry,uint32 item, uint32 maxcount, uint32 incrtime, uint32 extendedcost )
{
VendorItemData& vList = m_mCacheVendorItemMap[entry];
vList.AddItem(item,maxcount,incrtime,extendedcost);
WorldDatabase.PExecuteLog("INSERT INTO npc_vendor (entry,item,maxcount,incrtime,extendedcost) VALUES('%u','%u','%u','%u','%u')",entry, item, maxcount,incrtime,extendedcost);
}
bool ObjectMgr::RemoveVendorItem( uint32 entry,uint32 item )
{
CacheVendorItemMap::iterator iter = m_mCacheVendorItemMap.find(entry);
if(iter == m_mCacheVendorItemMap.end())
return false;
if(!iter->second.FindItem(item))
return false;
iter->second.RemoveItem(item);
WorldDatabase.PExecuteLog("DELETE FROM npc_vendor WHERE entry='%u' AND item='%u'",entry, item);
return true;
}
bool ObjectMgr::IsVendorItemValid( uint32 vendor_entry, uint32 item_id, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost, Player* pl ) const
{
CreatureInfo const* cInfo = GetCreatureTemplate(vendor_entry);
if(!cInfo)
{
if(pl)
ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
sLog.outErrorDb("Table `npc_vendor` have data for not existed creature template (Entry: %u), ignore", vendor_entry);
return false;
}
if(!(cInfo->npcflag & UNIT_NPC_FLAG_VENDOR))
{
if(pl)
ChatHandler(pl).SendSysMessage(LANG_COMMAND_VENDORSELECTION);
else
sLog.outErrorDb("Table `npc_vendor` have data for not creature template (Entry: %u) without vendor flag, ignore", vendor_entry);
return false;
}
if(!GetItemPrototype(item_id))
{
if(pl)
ChatHandler(pl).PSendSysMessage(LANG_ITEM_NOT_FOUND, item_id);
else
sLog.outErrorDb("Table `npc_vendor` for Vendor (Entry: %u) have in item list non-existed item (%u), ignore",vendor_entry,item_id);
return false;
}
if(ExtendedCost && !sItemExtendedCostStore.LookupEntry(ExtendedCost))
{
if(pl)
ChatHandler(pl).PSendSysMessage(LANG_EXTENDED_COST_NOT_EXIST,ExtendedCost);
else
sLog.outErrorDb("Table `npc_vendor` have Item (Entry: %u) with wrong ExtendedCost (%u) for vendor (%u), ignore",item_id,ExtendedCost,vendor_entry);
return false;
}
if(maxcount > 0 && incrtime == 0)
{
if(pl)
ChatHandler(pl).PSendSysMessage("MaxCount!=0 (%u) but IncrTime==0", maxcount);
else
sLog.outErrorDb( "Table `npc_vendor` has `maxcount` (%u) for item %u of vendor (Entry: %u) but `incrtime`=0, ignore", maxcount, item_id, vendor_entry);
return false;
}
else if(maxcount==0 && incrtime > 0)
{
if(pl)
ChatHandler(pl).PSendSysMessage("MaxCount==0 but IncrTime<>=0");
else
sLog.outErrorDb( "Table `npc_vendor` has `maxcount`=0 for item %u of vendor (Entry: %u) but `incrtime`<>0, ignore", item_id, vendor_entry);
return false;
}
VendorItemData const* vItems = GetNpcVendorItemList(vendor_entry);
if(!vItems)
return true; // later checks for non-empty lists
if(vItems->FindItem(item_id))
{
if(pl)
ChatHandler(pl).PSendSysMessage(LANG_ITEM_ALREADY_IN_LIST,item_id);
else
sLog.outErrorDb( "Table `npc_vendor` has duplicate items %u for vendor (Entry: %u), ignore", item_id, vendor_entry);
return false;
}
if(vItems->GetItemCount() >= MAX_VENDOR_ITEMS)
{
if(pl)
ChatHandler(pl).SendSysMessage(LANG_COMMAND_ADDVENDORITEMITEMS);
else
sLog.outErrorDb( "Table `npc_vendor` has too many items (%u >= %i) for vendor (Entry: %u), ignore", vItems->GetItemCount(), MAX_VENDOR_ITEMS, vendor_entry);
return false;
}
return true;
}
// Functions for scripting access
const char* GetAreaTriggerScriptNameById(uint32 id)
{
@@ -6848,7 +6969,7 @@ bool LoadMangosStrings(DatabaseType& db, char const* table,int32 start_value, in
{
if(start_value >= 0 || start_value <= end_value) // start/end reversed for negative values
{
sLog.outError("Table '%s' attempt loaded with invalid range (%d - %d), use (%d - %d) instead.",table,start_value,end_value,-1,std::numeric_limits<int32>::min());
sLog.outErrorDb("Table '%s' attempt loaded with invalid range (%d - %d), use (%d - %d) instead.",table,start_value,end_value,-1,std::numeric_limits<int32>::min());
start_value = -1;
end_value = std::numeric_limits<int32>::min();
}
+15 -12
View File
@@ -228,18 +228,8 @@ struct PlayerCondition
// NPC gossip text id
typedef HM_NAMESPACE::hash_map<uint32, uint32> CacheNpcTextIdMap;
// Vendors
struct VendorItem
{
uint32 item;
uint32 maxcount;
uint32 incrtime;
uint32 ExtendedCost;
};
typedef std::vector<VendorItem*> VendorItemList;
typedef HM_NAMESPACE::hash_map<uint32, VendorItemList> CacheVendorItemMap;
typedef HM_NAMESPACE::hash_map<uint32, VendorItemData> CacheVendorItemMap;
typedef HM_NAMESPACE::hash_map<uint32, TrainerSpellData> CacheTrainerSpellMap;
enum SkillRangeType
@@ -258,6 +248,16 @@ SkillRangeType GetSkillRangeType(SkillLineEntry const *pSkill, bool racial);
bool normalizePlayerName(std::string& name);
struct MANGOS_DLL_SPEC LanguageDesc
{
Language lang_id;
uint32 spell_id;
uint32 skill_id;
};
extern LanguageDesc lang_description[LANGUAGES_COUNT];
MANGOS_DLL_SPEC LanguageDesc const* GetLanguageDescByID(uint32 lang);
class PlayerDumpReader;
class ObjectMgr
@@ -732,7 +732,7 @@ class ObjectMgr
return &iter->second;
}
VendorItemList const* GetNpcVendorItemList(uint32 entry) const
VendorItemData const* GetNpcVendorItemList(uint32 entry) const
{
CacheVendorItemMap::const_iterator iter = m_mCacheVendorItemMap.find(entry);
if(iter == m_mCacheVendorItemMap.end())
@@ -740,6 +740,9 @@ class ObjectMgr
return &iter->second;
}
void AddVendorItem(uint32 entry,uint32 item, uint32 maxcount, uint32 incrtime, uint32 ExtendedCost);
bool RemoveVendorItem(uint32 entry,uint32 item);
bool IsVendorItemValid( uint32 vendor_entry, uint32 item, uint32 maxcount, uint32 ptime, uint32 ExtendedCost, Player* pl = NULL ) const;
protected:
uint32 m_auctionid;
uint32 m_mailid;
+1 -1
View File
@@ -1742,7 +1742,7 @@ void Pet::CastPetAura(PetAura const* aura)
if(auraId == 35696) // Demonic Knowledge
{
int32 basePoints = aura->GetDamage() * (GetStat(STAT_STAMINA) + GetStat(STAT_INTELLECT)) / 100;
int32 basePoints = int32(aura->GetDamage() * (GetStat(STAT_STAMINA) + GetStat(STAT_INTELLECT)) / 100);
CastCustomSpell(this,auraId,&basePoints, NULL, NULL, true );
}
else
+34 -17
View File
@@ -5794,7 +5794,7 @@ void Player::RewardReputation(Unit *pVictim, float rate)
if(!pVictim || pVictim->GetTypeId() == TYPEID_PLAYER)
return;
ReputationOnKillEntry const* Rep = objmgr.GetReputationOnKilEntry(pVictim->GetEntry());
ReputationOnKillEntry const* Rep = objmgr.GetReputationOnKilEntry(((Creature*)pVictim)->GetCreatureInfo()->Entry);
if(!Rep)
return;
@@ -16380,21 +16380,29 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
return false;
}
// load vendor items if not yet
pCreature->LoadGoods();
VendorItemData const* vItems = pCreature->GetVendorItems();
if(!vItems || vItems->Empty())
{
SendBuyError( BUY_ERR_CANT_FIND_ITEM, pCreature, item, 0);
return false;
}
CreatureItem* crItem = pCreature->FindItem(item);
VendorItem const* crItem = vItems->FindItem(item);
if(!crItem)
{
SendBuyError( BUY_ERR_CANT_FIND_ITEM, pCreature, item, 0);
return false;
}
if( crItem->maxcount != 0 && crItem->count < count )
// check current item amount if it limited
if( crItem->maxcount != 0 )
{
if(pCreature->GetVendorItemCurrentCount(crItem) < pProto->BuyCount * count )
{
SendBuyError( BUY_ERR_ITEM_ALREADY_SOLD, pCreature, item, 0);
return false;
}
}
if( uint32(GetReputationRank(pProto->RequiredReputationFaction)) < pProto->RequiredReputationRank)
{
@@ -16508,17 +16516,16 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
if(Item *it = StoreNewItem( dest, item, true ))
{
if( crItem->maxcount != 0 )
crItem->count -= pProto->BuyCount * count;
uint32 new_count = pCreature->UpdateVendorItemCurrentCount(crItem,pProto->BuyCount * count);
WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4));
data << pCreature->GetGUID();
data << (uint32)crItem->id; // entry
data << (uint32)crItem->count;
data << (uint32)crItem->item;
data << (uint32)(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF);
data << (uint32)count;
GetSession()->SendPacket(&data);
SendNewItem(it, count, true, false, false);
SendNewItem(it, pProto->BuyCount*count, true, false, false);
}
}
else if( IsEquipmentPos( bag, slot ) )
@@ -16548,17 +16555,16 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
if(Item *it = EquipNewItem( dest, item, pProto->BuyCount * count, true ))
{
if( crItem->maxcount != 0 )
crItem->count -= pProto->BuyCount * count;
uint32 new_count = pCreature->UpdateVendorItemCurrentCount(crItem,pProto->BuyCount * count);
WorldPacket data(SMSG_BUY_ITEM, (8+4+4+4));
data << pCreature->GetGUID();
data << (uint32)crItem->id; // entry
data << (uint32)crItem->count;
data << (uint32)crItem->item;
data << (uint32)(crItem->maxcount > 0 ? new_count : 0xFFFFFFFF);
data << (uint32)count;
GetSession()->SendPacket(&data);
SendNewItem(it, count, true, false, false);
SendNewItem(it, pProto->BuyCount*count, true, false, false);
AutoUnequipOffhandIfNeed();
}
@@ -16569,7 +16575,7 @@ bool Player::BuyItemFromVendor(uint64 vendorguid, uint32 item, uint8 count, uint
return false;
}
return crItem->maxcount!=0?true:false;
return crItem->maxcount!=0;
}
uint32 Player::GetMaxPersonalArenaRatingRequirement()
@@ -17174,7 +17180,7 @@ void Player::SendInitialPacketsBeforeAddToMap()
// set fly flag if in fly form or taxi flight to prevent visually drop at ground in showup moment
if(HasAuraType(SPELL_AURA_MOD_INCREASE_FLIGHT_SPEED) || isInFlight())
SetUnitMovementFlags(GetUnitMovementFlags() | MOVEMENTFLAG_FLYING2);
AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
}
void Player::SendInitialPacketsAfterAddToMap()
@@ -18167,3 +18173,14 @@ bool ItemPosCount::isContainedIn(ItemPosCountVec const& vec) const
return false;
}
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
);
}
+1
View File
@@ -1898,6 +1898,7 @@ class MANGOS_DLL_SPEC Player : public Unit
void ClearAfkReports() { m_bgAfkReporter.clear(); }
bool GetBGAccessByLevel(uint32 bgTypeId) const;
bool isAllowUseBattleGroundObject();
/*********************************************************/
/*** REST SYSTEM ***/
+3
View File
@@ -30,6 +30,9 @@ void PointMovementGenerator<T>::Initialize(T &unit)
unit.StopMoving();
Traveller<T> traveller(unit);
i_destinationHolder.SetDestination(traveller,i_x,i_y,i_z);
if (unit.GetTypeId() == TYPEID_UNIT && ((Creature*)&unit)->canFly())
unit.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
}
template<class T>
+63 -62
View File
@@ -23,105 +23,106 @@
Quest::Quest(Field * questRecord)
{
QuestId = questRecord[0].GetUInt32();
ZoneOrSort = questRecord[1].GetInt32();
SkillOrClass = questRecord[2].GetInt32();
MinLevel = questRecord[3].GetUInt32();
QuestLevel = questRecord[4].GetUInt32();
Type = questRecord[5].GetUInt32();
RequiredRaces = questRecord[6].GetUInt32();
RequiredSkillValue = questRecord[7].GetUInt32();
RepObjectiveFaction = questRecord[8].GetUInt32();
RepObjectiveValue = questRecord[9].GetInt32();
RequiredMinRepFaction = questRecord[10].GetUInt32();
RequiredMinRepValue = questRecord[11].GetInt32();
RequiredMaxRepFaction = questRecord[12].GetUInt32();
RequiredMaxRepValue = questRecord[13].GetInt32();
SuggestedPlayers = questRecord[14].GetUInt32();
LimitTime = questRecord[15].GetUInt32();
QuestFlags = questRecord[16].GetUInt16();
uint32 SpecialFlags = questRecord[17].GetUInt16();
CharTitleId = questRecord[18].GetUInt32();
PrevQuestId = questRecord[19].GetInt32();
NextQuestId = questRecord[20].GetInt32();
ExclusiveGroup = questRecord[21].GetInt32();
NextQuestInChain = questRecord[22].GetUInt32();
SrcItemId = questRecord[23].GetUInt32();
SrcItemCount = questRecord[24].GetUInt32();
SrcSpell = questRecord[25].GetUInt32();
Title = questRecord[26].GetCppString();
Details = questRecord[27].GetCppString();
Objectives = questRecord[28].GetCppString();
OfferRewardText = questRecord[29].GetCppString();
RequestItemsText = questRecord[30].GetCppString();
EndText = questRecord[31].GetCppString();
QuestMethod = questRecord[1].GetUInt32();
ZoneOrSort = questRecord[2].GetInt32();
SkillOrClass = questRecord[3].GetInt32();
MinLevel = questRecord[4].GetUInt32();
QuestLevel = questRecord[5].GetUInt32();
Type = questRecord[6].GetUInt32();
RequiredRaces = questRecord[7].GetUInt32();
RequiredSkillValue = questRecord[8].GetUInt32();
RepObjectiveFaction = questRecord[9].GetUInt32();
RepObjectiveValue = questRecord[10].GetInt32();
RequiredMinRepFaction = questRecord[11].GetUInt32();
RequiredMinRepValue = questRecord[12].GetInt32();
RequiredMaxRepFaction = questRecord[13].GetUInt32();
RequiredMaxRepValue = questRecord[14].GetInt32();
SuggestedPlayers = questRecord[15].GetUInt32();
LimitTime = questRecord[16].GetUInt32();
QuestFlags = questRecord[17].GetUInt16();
uint32 SpecialFlags = questRecord[18].GetUInt16();
CharTitleId = questRecord[19].GetUInt32();
PrevQuestId = questRecord[20].GetInt32();
NextQuestId = questRecord[21].GetInt32();
ExclusiveGroup = questRecord[22].GetInt32();
NextQuestInChain = questRecord[23].GetUInt32();
SrcItemId = questRecord[24].GetUInt32();
SrcItemCount = questRecord[25].GetUInt32();
SrcSpell = questRecord[26].GetUInt32();
Title = questRecord[27].GetCppString();
Details = questRecord[28].GetCppString();
Objectives = questRecord[29].GetCppString();
OfferRewardText = questRecord[30].GetCppString();
RequestItemsText = questRecord[31].GetCppString();
EndText = questRecord[32].GetCppString();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ObjectiveText[i] = questRecord[32+i].GetCppString();
ObjectiveText[i] = questRecord[33+i].GetCppString();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqItemId[i] = questRecord[36+i].GetUInt32();
ReqItemId[i] = questRecord[37+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqItemCount[i] = questRecord[40+i].GetUInt32();
ReqItemCount[i] = questRecord[41+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceId[i] = questRecord[44+i].GetUInt32();
ReqSourceId[i] = questRecord[45+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceCount[i] = questRecord[48+i].GetUInt32();
ReqSourceCount[i] = questRecord[49+i].GetUInt32();
for (int i = 0; i < QUEST_SOURCE_ITEM_IDS_COUNT; ++i)
ReqSourceRef[i] = questRecord[52+i].GetUInt32();
ReqSourceRef[i] = questRecord[53+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqCreatureOrGOId[i] = questRecord[56+i].GetInt32();
ReqCreatureOrGOId[i] = questRecord[57+i].GetInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqCreatureOrGOCount[i] = questRecord[60+i].GetUInt32();
ReqCreatureOrGOCount[i] = questRecord[61+i].GetUInt32();
for (int i = 0; i < QUEST_OBJECTIVES_COUNT; ++i)
ReqSpell[i] = questRecord[64+i].GetUInt32();
ReqSpell[i] = questRecord[65+i].GetUInt32();
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
RewChoiceItemId[i] = questRecord[68+i].GetUInt32();
RewChoiceItemId[i] = questRecord[69+i].GetUInt32();
for (int i = 0; i < QUEST_REWARD_CHOICES_COUNT; ++i)
RewChoiceItemCount[i] = questRecord[74+i].GetUInt32();
RewChoiceItemCount[i] = questRecord[75+i].GetUInt32();
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
RewItemId[i] = questRecord[80+i].GetUInt32();
RewItemId[i] = questRecord[81+i].GetUInt32();
for (int i = 0; i < QUEST_REWARDS_COUNT; ++i)
RewItemCount[i] = questRecord[84+i].GetUInt32();
RewItemCount[i] = questRecord[85+i].GetUInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepFaction[i] = questRecord[88+i].GetUInt32();
RewRepFaction[i] = questRecord[89+i].GetUInt32();
for (int i = 0; i < QUEST_REPUTATIONS_COUNT; ++i)
RewRepValue[i] = questRecord[93+i].GetInt32();
RewRepValue[i] = questRecord[94+i].GetInt32();
RewOrReqMoney = questRecord[98].GetInt32();
RewMoneyMaxLevel = questRecord[99].GetUInt32();
RewSpell = questRecord[100].GetUInt32();
RewSpellCast = questRecord[101].GetUInt32();
RewMailTemplateId = questRecord[102].GetUInt32();
RewMailDelaySecs = questRecord[103].GetUInt32();
PointMapId = questRecord[104].GetUInt32();
PointX = questRecord[105].GetFloat();
PointY = questRecord[106].GetFloat();
PointOpt = questRecord[107].GetUInt32();
RewOrReqMoney = questRecord[99].GetInt32();
RewMoneyMaxLevel = questRecord[100].GetUInt32();
RewSpell = questRecord[101].GetUInt32();
RewSpellCast = questRecord[102].GetUInt32();
RewMailTemplateId = questRecord[103].GetUInt32();
RewMailDelaySecs = questRecord[104].GetUInt32();
PointMapId = questRecord[105].GetUInt32();
PointX = questRecord[106].GetFloat();
PointY = questRecord[107].GetFloat();
PointOpt = questRecord[108].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
DetailsEmote[i] = questRecord[108+i].GetUInt32();
DetailsEmote[i] = questRecord[109+i].GetUInt32();
IncompleteEmote = questRecord[112].GetUInt32();
CompleteEmote = questRecord[113].GetUInt32();
IncompleteEmote = questRecord[113].GetUInt32();
CompleteEmote = questRecord[114].GetUInt32();
for (int i = 0; i < QUEST_EMOTE_COUNT; ++i)
OfferRewardEmote[i] = questRecord[114+i].GetInt32();
OfferRewardEmote[i] = questRecord[115+i].GetInt32();
QuestStartScript = questRecord[118].GetUInt32();
QuestCompleteScript = questRecord[119].GetUInt32();
QuestStartScript = questRecord[119].GetUInt32();
QuestCompleteScript = questRecord[120].GetUInt32();
QuestFlags |= SpecialFlags << 16;
+4 -2
View File
@@ -114,7 +114,7 @@ enum __QuestFlags
{
// Flags used at server and sended to client
QUEST_FLAGS_STAY_ALIVE = 1, // Not used currently
QUEST_FLAGS_EVENT = 2, // 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
@@ -167,6 +167,7 @@ class Quest
// table data accessors:
uint32 GetQuestId() const { return QuestId; }
uint32 GetQuestMethod() const { return QuestMethod; }
int32 GetZoneOrSort() const { return ZoneOrSort; }
int32 GetSkillOrClass() const { return SkillOrClass; }
uint32 GetMinLevel() const { return MinLevel; }
@@ -212,7 +213,7 @@ class Quest
uint32 GetQuestStartScript() const { return QuestStartScript; }
uint32 GetQuestCompleteScript() const { return QuestCompleteScript; }
bool IsRepeatable() const { return QuestFlags & QUEST_MANGOS_FLAGS_REPEATABLE; }
bool IsAutoComplete() const { return Objectives.empty(); }
bool IsAutoComplete() const { return QuestMethod ? false : true; }
uint32 GetFlags() const { return QuestFlags; }
bool IsDaily() const { return QuestFlags & QUEST_FLAGS_DAILY; }
@@ -255,6 +256,7 @@ class Quest
// table data
protected:
uint32 QuestId;
uint32 QuestMethod;
int32 ZoneOrSort;
int32 SkillOrClass;
uint32 MinLevel;
+8 -4
View File
@@ -31,7 +31,6 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
{
float X,Y,Z,z,nx,ny,nz,wander_distance,ori,dist;
creature.GetRespawnCoord(X, Y, Z);
creature.GetRespawnCoord(X, Y, Z, &ori, &wander_distance);
z = creature.GetPositionZ();
@@ -50,6 +49,11 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
nx = X + distanceX;
ny = Y + distanceY;
// prevent invalid coordinates generation
MaNGOS::NormalizeMapCoord(nx);
MaNGOS::NormalizeMapCoord(ny);
dist = distanceX*distanceX + distanceY*distanceY;
if (is_air_ok) // 3D system above ground and above water (flying mode)
@@ -87,7 +91,7 @@ RandomMovementGenerator<Creature>::_setRandomLocation(Creature &creature)
if (is_air_ok)
{
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
}
//else if (is_water_ok) // Swimming mode to be done with more than this check
else
@@ -105,7 +109,7 @@ RandomMovementGenerator<Creature>::Initialize(Creature &creature)
return;
if (creature.canFly())
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
else
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MOVEMENTFLAG_WALK_MODE : MOVEMENTFLAG_NONE );
_setRandomLocation(creature);
@@ -144,7 +148,7 @@ RandomMovementGenerator<Creature>::Update(Creature &creature, const uint32 &diff
if(i_nextMoveTime.Passed())
{
if (creature.canFly())
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
else
creature.SetUnitMovementFlags(irand(0,RUNNING_CHANCE_RANDOMMV) > 0 ? MOVEMENTFLAG_WALK_MODE : MOVEMENTFLAG_NONE);
_setRandomLocation(creature);
+5
View File
@@ -3681,6 +3681,11 @@ uint8 Spell::CanCast(bool strict)
(!m_targets.getItemTarget() || !m_targets.getItemTarget()->GetProto()->LockID || m_targets.getItemTarget()->GetOwner() != m_caster ) )
return SPELL_FAILED_BAD_TARGETS;
// In BattleGround players can use only flags and banners
if( ((Player*)m_caster)->InBattleGround() &&
!((Player*)m_caster)->isAllowUseBattleGroundObject() )
return SPELL_FAILED_TRY_AGAIN;
// get the lock entry
LockEntry const *lockInfo = NULL;
if (GameObject* go=m_targets.getGOTarget())
+97 -8
View File
@@ -52,6 +52,8 @@
#include "Language.h"
#include "SocialMgr.h"
#include "Util.h"
#include "TemporarySummon.h"
pEffect SpellEffects[TOTAL_SPELL_EFFECTS]=
{
@@ -1006,6 +1008,74 @@ void Spell::EffectDummy(uint32 i)
m_caster->CastSpell(m_caster,42337,true,NULL);
return;
}
case 37573: //Temporal Phase Modulator
{
if(!unitTarget)
return;
TemporarySummon* tempSummon = dynamic_cast<TemporarySummon*>(unitTarget);
if(!tempSummon)
return;
uint32 health = tempSummon->GetHealth();
const uint32 entry_list[6] = {21821, 21820, 21817};
float x = tempSummon->GetPositionX();
float y = tempSummon->GetPositionY();
float z = tempSummon->GetPositionZ();
float o = tempSummon->GetOrientation();
tempSummon->UnSummon();
Creature* pCreature = m_caster->SummonCreature(entry_list[urand(0, 2)], x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000);
if (!pCreature)
return;
pCreature->SetHealth(health);
if(pCreature->AI())
pCreature->AI()->AttackStart(m_caster);
return;
}
case 34665: //Administer Antidote
{
if(!unitTarget || m_caster->GetTypeId() != TYPEID_PLAYER )
return;
if(!unitTarget)
return;
TemporarySummon* tempSummon = dynamic_cast<TemporarySummon*>(unitTarget);
if(!tempSummon)
return;
uint32 health = tempSummon->GetHealth();
float x = tempSummon->GetPositionX();
float y = tempSummon->GetPositionY();
float z = tempSummon->GetPositionZ();
float o = tempSummon->GetOrientation();
tempSummon->UnSummon();
Creature* pCreature = m_caster->SummonCreature(16992, x, y, z, o,TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,180000);
if (!pCreature)
return;
pCreature->SetHealth(health);
((Player*)m_caster)->KilledMonster(16992,pCreature->GetGUID());
if (pCreature->AI())
pCreature->AI()->AttackStart(m_caster);
return;
}
case 44997: // Converting Sentry
{
//Converted Sentry Credit
m_caster->CastSpell(m_caster, 45009, true);
return;
}
case 45030: // Impale Emissary
{
// Emissary of Hate Credit
@@ -1102,6 +1172,16 @@ void Spell::EffectDummy(uint32 i)
}
return;
}
case 32826:
{
if ( unitTarget && unitTarget->GetTypeId() == TYPEID_UNIT )
{
//Polymorph Cast Visual Rank 1
const uint32 spell_list[6] = {32813, 32816, 32817, 32818, 32819, 32820};
unitTarget->CastSpell( unitTarget, spell_list[urand(0, 5)], true);
}
return;
}
}
break;
case SPELLFAMILY_WARRIOR:
@@ -2760,28 +2840,27 @@ void Spell::EffectOpenLock(uint32 /*i*/)
if( goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune ||
goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK )
{
if(BattleGround *bg = player->GetBattleGround())// in battleground
{
if( !player->IsMounted() && // not mounted
!player->HasStealthAura() && // not stealthed
!player->HasInvisibilityAura() && // not invisible
player->isAlive() ) // live player
//isAllowUseBattleGroundObject() already called in CanCast()
// in battleground check
if(BattleGround *bg = player->GetBattleGround())
{
// check if it's correct bg
if(bg && bg->GetTypeID() == BATTLEGROUND_AB)
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
return;
}
}
}
else if (goInfo->type == GAMEOBJECT_TYPE_FLAGSTAND)
{
//isAllowUseBattleGroundObject() already called in CanCast()
// in battleground check
if(BattleGround *bg = player->GetBattleGround())
{
if(bg->GetTypeID() == BATTLEGROUND_EY)
bg->EventPlayerClickedOnFlag(player, gameObjTarget);
return;
}
}
lockId = gameObjTarget->GetLockId();
guid = gameObjTarget->GetGUID();
}
@@ -4751,6 +4830,16 @@ void Spell::EffectScriptEffect(uint32 effIndex)
unitTarget->CastSpell(unitTarget, spellId, true);
break;
}
//5,000 Gold
case 46642:
{
if(!unitTarget || unitTarget->GetTypeId() != TYPEID_PLAYER)
return;
((Player*)unitTarget)->ModifyMoney(50000000);
break;
}
}
if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN )
+9
View File
@@ -85,6 +85,8 @@ TargetedMovementGenerator<T>::_setTargetLocation(T &owner)
Traveller<T> traveller(owner);
i_destinationHolder.SetDestination(traveller, x, y, z);
owner.addUnitState(UNIT_STAT_CHASE);
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
}
template<class T>
@@ -94,6 +96,10 @@ TargetedMovementGenerator<T>::Initialize(T &owner)
if(!&owner)
return;
owner.RemoveUnitMovementFlag(MOVEMENTFLAG_WALK_MODE);
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
_setTargetLocation(owner);
}
@@ -143,6 +149,9 @@ TargetedMovementGenerator<T>::Update(T &owner, const uint32 & time_diff)
if( owner.IsStopped() && !i_destinationHolder.HasArrived() )
{
owner.addUnitState(UNIT_STAT_CHASE);
if (owner.GetTypeId() == TYPEID_UNIT && ((Creature*)&owner)->canFly())
owner.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
i_destinationHolder.StartTravel(traveller);
return true;
}
+2 -2
View File
@@ -112,7 +112,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &di
// Now we re-set destination to same node and start travel
creature.addUnitState(UNIT_STAT_ROAMING);
if (creature.canFly())
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
const WaypointNode &node = i_path->at(i_currentNode);
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
@@ -176,7 +176,7 @@ WaypointMovementGenerator<Creature>::Update(Creature &creature, const uint32 &di
{
creature.addUnitState(UNIT_STAT_ROAMING);
if (creature.canFly())
creature.SetUnitMovementFlags(MOVEMENTFLAG_FLYING2);
creature.AddUnitMovementFlag(MOVEMENTFLAG_FLYING2);
const WaypointNode &node = i_path->at(i_currentNode);
i_destinationHolder.SetDestination(traveller, node.x, node.y, node.z);
i_nextMoveTime.Reset(i_destinationHolder.GetTotalTravelTime());
+4 -4
View File
@@ -52,8 +52,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,2,6721,676
PRODUCTVERSION 0,2,6721,676
FILEVERSION 0,3,6731,680
PRODUCTVERSION 0,3,6731,680
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -69,12 +69,12 @@ BEGIN
BLOCK "080004b0"
BEGIN
VALUE "FileDescription", "TrinityCore"
VALUE "FileVersion", "0, 2, 6721, 676"
VALUE "FileVersion", "0, 3, 6731, 680"
VALUE "InternalName", "TrinityCore"
VALUE "LegalCopyright", "Copyright (C) 2008"
VALUE "OriginalFilename", "TrinityCore.exe"
VALUE "ProductName", "TrinityCore"
VALUE "ProductVersion", "0, 2, 6721, 676"
VALUE "ProductVersion", "0, 3, 6731, 680"
END
END
BLOCK "VarFileInfo"
+4 -4
View File
@@ -52,8 +52,8 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_SYS_DEFAULT
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,2,6721,676
PRODUCTVERSION 0,2,6721,676
FILEVERSION 0,3,6731,680
PRODUCTVERSION 0,3,6731,680
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -69,12 +69,12 @@ BEGIN
BLOCK "080004b0"
BEGIN
VALUE "FileDescription", "TrinityRealm"
VALUE "FileVersion", "0, 2, 6721, 676"
VALUE "FileVersion", "0, 3, 6731, 680"
VALUE "InternalName", "TrinityRealm"
VALUE "LegalCopyright", "Copyright (C) 2008"
VALUE "OriginalFilename", "TrinityRealm.exe"
VALUE "ProductName", "TrinityRealm"
VALUE "ProductVersion", "0, 2, 6721, 676"
VALUE "ProductVersion", "0, 3, 6731, 680"
END
END
BLOCK "VarFileInfo"
+10 -10
View File
@@ -49,7 +49,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /wd 4748"
AdditionalOptions="/MP /wd 4748 /wd 4244"
Optimization="0"
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
PreprocessorDefinitions="ACE_BUILD_DLL;_DEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
@@ -138,7 +138,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /wd 4748"
AdditionalOptions="/MP /wd 4748 /wd 4244"
Optimization="0"
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
PreprocessorDefinitions="ACE_BUILD_DLL;_DEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
@@ -228,7 +228,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /wd 4748"
AdditionalOptions="/MP /wd 4748 /wd 4244"
Optimization="2"
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
PreprocessorDefinitions="ACE_BUILD_DLL;NDEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
@@ -316,7 +316,7 @@
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions="/MP /wd 4748"
AdditionalOptions="/MP /wd 4748 /wd 4244"
Optimization="2"
AdditionalIncludeDirectories="..\..\dep\ACE_wrappers"
PreprocessorDefinitions="ACE_BUILD_DLL;NDEBUG;WIN32;_WINDOWS;_CRT_NONSTDC_NO_WARNINGS;_AMD64_;_WIN64;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE"
@@ -2853,11 +2853,11 @@
>
</File>
<File
RelativePath="..\..\dep\ACE_wrappers\ace\OS_Errno.h"
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_errno.h"
>
</File>
<File
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_errno.h"
RelativePath="..\..\dep\ACE_wrappers\ace\OS_Errno.h"
>
</File>
<File
@@ -3237,11 +3237,11 @@
>
</File>
<File
RelativePath="..\..\dep\ACE_wrappers\ace\OS_String.h"
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_string.h"
>
</File>
<File
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_string.h"
RelativePath="..\..\dep\ACE_wrappers\ace\OS_String.h"
>
</File>
<File
@@ -3285,11 +3285,11 @@
>
</File>
<File
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\sys\os_time.h"
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_time.h"
>
</File>
<File
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\os_time.h"
RelativePath="..\..\dep\ACE_wrappers\ace\os_include\sys\os_time.h"
>
</File>
<File