Jump to content

[not working] Outdoor Pvp


Recommended Posts

The sql isn't working for me:

[Err] 1054 - Unknown column 'flags' in 'field list'
[Err] -- pvp flag
update creature_template set flags = flags | 0x1000 where entry in (18816,18821,21474,21484,21483,18192,18817,18822,21485,21487,21488,18256);
[Msg] Finished - Unsuccessfully

Link to comment
Share on other sites

  • Replies 621
  • Created
  • Last Reply

Top Posters In This Topic

The sql isn't working for me:

[Err] 1054 - Unknown column 'flags' in 'field list'
[Err] -- pvp flag
update creature_template set flags = flags | 0x1000 where entry in (18816,18821,21474,21484,21483,18192,18817,18822,21485,21487,21488,18256);
[Msg] Finished - Unsuccessfully

You have old SQLs from some reason.. Use sqls in sql/outdoorpvp_sql/mangos.sql

Link to comment
Share on other sites

Hi, recently I've seen too many spam in logs:

ERROR:EffectTriggerSpell of spell 29534: triggering unknown spell id 31247

ERROR:Player::ModifyFactionReputation: Can't update reputation of Player for unknown faction (faction template id) #609.

The thing is that this is some reward spell for Outdoor pvp in Silithus. But that's not not the main problem... I had reports in the same time that players can farm honor along with this rewards with only mouse clicking.

I've just removed this spell along with honor rewards from sources... hope someone can fix this problem properly=\\

That's the buggy piece of code, I'm taling about:

http://github.com/charlie2025/mangos/blob/0ef5262b7d61a2db9c8c04d0b69778aaef376a53/src/game/OutdoorPvPSI.cpp

Link to comment
Share on other sites

Hi, recently I've seen too many spam in logs:

The thing is that this is some reward spell for Outdoor pvp in Silithus. But that's not not the main problem... I had reports in the same time that players can farm honor along with this rewards with only mouse clicking.

I've just removed this spell along with honor rewards from sources... hope someone can fix this problem properly=\\

That's the buggy piece of code, I'm taling about:

http://github.com/charlie2025/mangos/blob/0ef5262b7d61a2db9c8c04d0b69778aaef376a53/src/game/OutdoorPvPSI.cpp

Hello,

To first error log : This spell 29534 (by dbc) should trigger 31247 .. so it is some problem with core

and how "can farm honor with mouse clicking" ??

To second log, faction 609 exists also so I don't understand this also..

I will test myself, if I got same errors.. then I will fix.

Link to comment
Share on other sites

  • 2 weeks later...

7594

9>OutdoorPvPSI.cpp
9>..\\..\\src\\game\\OutdoorPvPSI.cpp(133) : error C2039: 'ModifyFactionReputation' : is not a member of 'Player'
9>        c:\\mangos-0.12\\src\\game\\Player.h(862) : see declaration of 'Player'
9>..\\..\\src\\game\\OutdoorPvPSI.cpp(158) : error C2039: 'ModifyFactionReputation' : is not a member of 'Player'
9>        c:\\mangos-0.12\\src\\game\\Player.h(862) : see declaration of 'Player'
9>OutdoorPvPNA.cpp
9>OutdoorPvPMgr.cpp
9>c:\\mangos-0.12\\src\\game\\OutdoorPvPEP.h(6) : fatal error C1083: Cannot open include file: 'Database/DBCStructure.h': No such file or directory
9>OutdoorPvPHP.cpp
9>OutdoorPvPEP.cpp
9>c:\\mangos-0.12\\src\\game\\OutdoorPvPEP.h(6) : fatal error C1083: Cannot open include file: 'Database/DBCStructure.h': No such file or directory

Link to comment
Share on other sites

7594

9>OutdoorPvPSI.cpp
9>..\\..\\src\\game\\OutdoorPvPSI.cpp(133) : error C2039: 'ModifyFactionReputation' : is not a member of 'Player'
9>        c:\\mangos-0.12\\src\\game\\Player.h(862) : see declaration of 'Player'
9>..\\..\\src\\game\\OutdoorPvPSI.cpp(158) : error C2039: 'ModifyFactionReputation' : is not a member of 'Player'
9>        c:\\mangos-0.12\\src\\game\\Player.h(862) : see declaration of 'Player'
9>OutdoorPvPNA.cpp
9>OutdoorPvPMgr.cpp
9>c:\\mangos-0.12\\src\\game\\OutdoorPvPEP.h(6) : fatal error C1083: Cannot open include file: 'Database/DBCStructure.h': No such file or directory
9>OutdoorPvPHP.cpp
9>OutdoorPvPEP.cpp
9>c:\\mangos-0.12\\src\\game\\OutdoorPvPEP.h(6) : fatal error C1083: Cannot open include file: 'Database/DBCStructure.h': No such file or directory

Those was fixed time ago.. did you tried to pull again ?

EDIT: Sorry, it is outdoor-0.12 , there it wasn't fixed.. so wait a sec

EDIT #2 Should be fixed now

Link to comment
Share on other sites

7602

git pull git://github.com/charlie2025/mangos.git outdoor_0.12
remote: Counting objects: 513, done.
remote: Compressing objects: 100% (140/140), done.
Indexing 311 objects...
remote: Total 311 (delta 260), reused 212 (delta 170)
100% (311/311) done
Resolving 260 deltas...
100% (260/260) done
60 objects were added to complete this thin pack.
Auto-merged src/game/Player.cpp
Auto-merged src/game/Spell.cpp
Auto-merged src/game/SpellAuras.cpp
CONFLICT (content): Merge conflict in src/game/SpellAuras.cpp
Auto-merged src/game/Unit.cpp
Automatic merge failed; fix conflicts and then commit the result.

Link to comment
Share on other sites

outdoor_0.12

UPDATE creature_template SET flags = flags | 0x1000 WHERE entry IN (18816,18821,21474,21484,21483,18192,18817,18822,21485,21487,21488,18256);

old flag name `flags` should be `unit_flags`

also eventai has slighly changed since SQL was writed. I assume should loke like this?

DELETE FROM `eventai_scripts` WHERE `creature_id` = 18225;
INSERT INTO `eventai_scripts` VALUES
('1822501','18225','11','0','100','0','0','0','0','0','11','31961','0','4','0','0','0','0','0','0','0','0','Fire Bomb Target cast Fire Bomb on Spawn'),
('1822502','18225','0','0','100','0','5000','5000','0','0','37','0','0','0','0','0','0','0','0','0','0','0','Fire Bomb Target Despawn');

Link to comment
Share on other sites

Updated SQL.

-- Fire bomb script

DELETE FROM `creature_ai_scripts` WHERE `creature_id` = 18225;
INSERT INTO `creature_ai_scripts`(`creature_id`,`event_type`,`event_inverse_phase_mask`,`event_chance`
,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`action1_type`,`action1_param1`
,`action1_param2`,`action1_param3`,`action2_type`,`action2_param1`,`action2_param2`,`action2_param3`,
`action3_type`,`action3_param1`,`action3_param2`,`action3_param3`,`comment`) VALUES
(18225,11,0,100,0,0,0,0,0,11,31961,0,4,0,0,0,0,0,0,0,0,'Fire Bomb Target cast Fire Bomb on Spawn'),
(18225,0,100,5000,0,5000,0,0,0,37,0,0,0,0,0,0,0,0,0,0,0,'Fire Bomb Target Despawn');

UPDATE creature_template SET AIName = 'EventAI', ScriptName='' WHERE `entry` = 18225;

Link to comment
Share on other sites

Is it the good way ?

With this, I can compile...

OutdoorPvPObjectiveAI.cpp

@ -23,43 +23,48 @@
#include "OutdoorPvPMgr.h"
#include "World.h"

#define MAX_OUTDOOR_PVP_DISTANCE 200 // the max value in capture point type go data0 is 100 currently, so use twice that much to handle leaving as well

-OutdoorPvPObjectiveAI::OutdoorPvPObjectiveAI(Creature &c) : i_creature(c)
+OutdoorPvPObjectiveAI::OutdoorPvPObjectiveAI(Creature *c) : CreatureAI(c)
{
-    sLog.outDebug("OutdoorPvP objective AI assigned to creature guid %u", c.GetGUIDLow());
+    sLog.outDebug("OutdoorPvP objective AI assigned to creature guid %u", c->GetGUIDLow());
}

void OutdoorPvPObjectiveAI::MoveInLineOfSight(Unit *u)
{
    // IsVisible only passes for players in range, so no need to check again
    // leaving/entering distance will be checked based on go range data
-    sOutdoorPvPMgr.HandleCaptureCreaturePlayerMoveInLos(((Player*)u),&i_creature);
+    sOutdoorPvPMgr.HandleCaptureCreaturePlayerMoveInLos(((Player*)u),m_creature);
}

int OutdoorPvPObjectiveAI::Permissible(const Creature * c)
{
    // this AI can only be assigned if the AIName is OutdoorPvPObjectiveAI. It shouldn't be returned by permissible check.
    return PERMIT_BASE_NO;
}

bool OutdoorPvPObjectiveAI::IsVisible(Unit *pl) const
{
-    return (pl->GetTypeId() == TYPEID_PLAYER) && (i_creature.GetDistance(pl) < MAX_OUTDOOR_PVP_DISTANCE * MAX_OUTDOOR_PVP_DISTANCE);
+    return (pl->GetTypeId() == TYPEID_PLAYER) && (m_creature->GetDistance(pl) < MAX_OUTDOOR_PVP_DISTANCE * MAX_OUTDOOR_PVP_DISTANCE);
}

void OutdoorPvPObjectiveAI::AttackStart(Unit *)
{
    EnterEvadeMode();
}

void OutdoorPvPObjectiveAI::EnterEvadeMode()
{
-    i_creature.DeleteThreatList();
-    i_creature.CombatStop();
+    m_creature->DeleteThreatList();
+    m_creature->CombatStop();
}

void OutdoorPvPObjectiveAI::UpdateAI(const uint32 diff)
{
}

+Creature& OutdoorPvPObjectiveAI::getCreature()
+{
+   return static_cast<Creature&>(*m_creature);
+}

OutdoorPvPObjectiveAI.h

@@ -25,19 +25,19 @@ class Creature;

class MANGOS_DLL_DECL OutdoorPvPObjectiveAI : public CreatureAI
{
    public:

-        OutdoorPvPObjectiveAI(Creature &c);
+        explicit OutdoorPvPObjectiveAI(Creature *c);

        void MoveInLineOfSight(Unit *);
        bool IsVisible(Unit *) const;
        void AttackStart(Unit *);
        void EnterEvadeMode();
        void UpdateAI(const uint32 diff);

        static int Permissible(const Creature *);

-    private:
-        Creature &i_creature;
+    protected:
+       Creature& getCreature();
};
#endif

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use