Changeset 44 for trunk/src/bindings/scripts/include
- Timestamp:
- 11/19/08 13:27:40 (17 years ago)
- Location:
- trunk/src/bindings/scripts/include
- Files:
-
- 4 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/include/sc_creature.cpp
r37 r44 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 1 /* Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 2 * 3 * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 4 * 2 5 * This program is free software licensed under GPL version 2 3 6 * Please see the included DOCS/LICENSE.TXT for more information */ … … 507 510 Unit* ScriptedAI::DoSelectLowestHpFriendly(float range, uint32 MinHPDiff) 508 511 { 509 CellPair p( MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));512 CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); 510 513 Cell cell(p); 511 514 cell.data.Part.reserved = ALL_DISTRICT; … … 514 517 Unit* pUnit = NULL; 515 518 516 MaNGOS::MostHPMissingInRange u_check(m_creature, range, MinHPDiff);517 MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange> searcher(pUnit, u_check);519 Trinity::MostHPMissingInRange u_check(m_creature, range, MinHPDiff); 520 Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange> searcher(pUnit, u_check); 518 521 519 522 /* … … 521 524 This means that if we only search grid then we cannot possibly return pets or players so this is safe 522 525 */ 523 TypeContainerVisitor< MaNGOS::UnitLastSearcher<MaNGOS::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher);526 TypeContainerVisitor<Trinity::UnitLastSearcher<Trinity::MostHPMissingInRange>, GridTypeMapContainer > grid_unit_searcher(searcher); 524 527 525 528 CellLock<GridReadGuard> cell_lock(cell, p); … … 530 533 std::list<Creature*> ScriptedAI::DoFindFriendlyCC(float range) 531 534 { 532 CellPair p( MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));535 CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); 533 536 Cell cell(p); 534 537 cell.data.Part.reserved = ALL_DISTRICT; … … 537 540 std::list<Creature*> pList; 538 541 539 MaNGOS::FriendlyCCedInRange u_check(m_creature, range);540 MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange> searcher(pList, u_check);541 542 TypeContainerVisitor< MaNGOS::CreatureListSearcher<MaNGOS::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);542 Trinity::FriendlyCCedInRange u_check(m_creature, range); 543 Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange> searcher(pList, u_check); 544 545 TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyCCedInRange>, GridTypeMapContainer > grid_creature_searcher(searcher); 543 546 544 547 CellLock<GridReadGuard> cell_lock(cell, p); … … 550 553 std::list<Creature*> ScriptedAI::DoFindFriendlyMissingBuff(float range, uint32 spellid) 551 554 { 552 CellPair p( MaNGOS::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY()));555 CellPair p(Trinity::ComputeCellPair(m_creature->GetPositionX(), m_creature->GetPositionY())); 553 556 Cell cell(p); 554 557 cell.data.Part.reserved = ALL_DISTRICT; … … 557 560 std::list<Creature*> pList; 558 561 559 MaNGOS::FriendlyMissingBuffInRange u_check(m_creature, range, spellid);560 MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange> searcher(pList, u_check);561 562 TypeContainerVisitor< MaNGOS::CreatureListSearcher<MaNGOS::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher);562 Trinity::FriendlyMissingBuffInRange u_check(m_creature, range, spellid); 563 Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange> searcher(pList, u_check); 564 565 TypeContainerVisitor<Trinity::CreatureListSearcher<Trinity::FriendlyMissingBuffInRange>, GridTypeMapContainer > grid_creature_searcher(searcher); 563 566 564 567 CellLock<GridReadGuard> cell_lock(cell, p); -
trunk/src/bindings/scripts/include/sc_creature.h
r14 r44 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 1 /* Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 2 * 3 * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 4 * 2 5 * This program is free software licensed under GPL version 2 3 6 * Please see the included DOCS/LICENSE.TXT for more information */ … … 9 12 #include "Creature.h" 10 13 11 struct MANGOS_DLL_DECL ScriptedAI : public CreatureAI14 struct TRINITY_DLL_DECL ScriptedAI : public CreatureAI 12 15 { 13 16 ScriptedAI(Creature* creature) : m_creature(creature), InCombat(false) {} … … 27 30 void EnterEvadeMode(); 28 31 29 //Called at any heal cast/item used (call non implemented in mangos)32 //Called at any heal cast/item used (call non implemented in Trinity) 30 33 void HealBy(Unit *healer, uint32 amount_healed) {} 31 34 … … 154 157 }; 155 158 156 struct MANGOS_DLL_DECL Scripted_NoMovementAI : public ScriptedAI159 struct TRINITY_DLL_DECL Scripted_NoMovementAI : public ScriptedAI 157 160 { 158 161 Scripted_NoMovementAI(Creature* creature) : ScriptedAI(creature) {} -
trunk/src/bindings/scripts/include/sc_gossip.h
r37 r44 1 /* Copyright (C) 2006 - 2008 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 1 /* Copyright (C) 2008 Trinity <http://www.trinitycore.org/> 2 * 3 * Thanks to the original authors: ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 4 * 2 5 * This program is free software licensed under GPL version 2 3 6 * Please see the included DOCS/LICENSE.TXT for more information */ -
trunk/src/bindings/scripts/include/sc_instance.h
r2 r44 23 23 #define OUT_LOAD_INST_DATA_FAIL error_log("SD2: Unable to load Instance Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) 24 24 25 class MANGOS_DLL_DECL ScriptedInstance : public InstanceData25 class TRINITY_DLL_DECL ScriptedInstance : public InstanceData 26 26 { 27 27 public: