Jump to content

[Help] Implementing Vehicles


Recommended Posts

but... I understood one thing.

I got a clean source... Then

git pull git://github.com/Tasssadar/Valhalla-Project.git vehicle

then

patch -p1 -l <dua.patch

now compiling... then testing...

and I notices 3-4 SQL errors,,,

but a made vehicle.pacth as diff master vehicle....

Well ... see how It Will work

sorry for my bad English

when you pulled the sources you obtained all updates.

If the dua.patch is dual spec, you done ererything right.

If you show the errors i'll help to fix it.

Link to comment
Share on other sites

  • Replies 604
  • Created
  • Last Reply

Top Posters In This Topic

i have a error...

error: no changes?

wat?

ty guys

I don't understand what you want to say... Use a translater or somthing else...

Wojta there is no way to spawn a vehicle instead a creature. And I has come to a conclusion that is right and blizzlike.

In the wintergrasp and the ulduar a vehicles must be spawned by a script.

I think there is no problem as we thought earlier.

Link to comment
Share on other sites

hello

can you update the patch file for new mangos core and post the patch pls

big thx

You can make patch with your hands (sorry my bad English :D )

For this do this steps

cd YOURFOLDER

git clone git://github.com/Tasssadar/Valhalla-Project.git

mkdir patches

cd patches

git format-patch origin/vehicle ce7dae7565a981a9b5694966ed0fc492e7a02c63

ce7dae7565a981a9b5694966ed0fc492e7a02c63 - it's hash of the latest commit, see on

http://github.com/Tasssadar/Valhalla-Project/commits/vehicle

And in folder YOURFOLDER/patches you get all patches from first commit on repo to last commit.

For example 3030--vh1-VEHICLE-PATCH.patch

Link to comment
Share on other sites

Wojta there is no way to spawn a vehicle instead a creature. And I has come to a conclusion that is right and blizzlike.

In the wintergrasp and the ulduar a vehicles must be spawned by a script.

I think there is no problem as we thought earlier.

Yes..but there are many Q in NR which uses vehicles, and there are pre-spawned here, for example: http://www.wowhead.com/?quest=12326#. or http://www.wowhead.com/?quest=12856#. and theres many more of them :/ but maybe when you click on them, new vehicle spawns and the old one despawns(not die, despawn), so it does not look so horrible :/ but if its not vehicle, you cant see accessories, and in ulduar there are many vehicles near flame levithian(they are flying, http://www.wowhead.com/?npc=33214). Script for spawns like that would be really big :/)

ArtUrlWWW: never, because I using this GIT for my server :)

Link to comment
Share on other sites

So, I understood that basically vehicles in Ulduar are realized ... all vehicles are working normally ... It's only deal with spawn left.

PS now I'm picking base of 3x repositories ... repository Kicho, current repository and the base with an alternative kernel ...

PPS I don't want to put trinitycore2 because there already almost is done ... It's better to look at code :)

Link to comment
Share on other sites

Yes..but there are many Q in NR which uses vehicles, and there are pre-spawned here, for example: http://www.wowhead.com/?quest=12326#. or http://www.wowhead.com/?quest=12856#. and theres many more of them :/ but maybe when you click on them, new vehicle spawns and the old one despawns(not die, despawn), so it does not look so horrible :/ but if its not vehicle, you cant see accessories, and in ulduar there are many vehicles near flame levithian(they are flying, http://www.wowhead.com/?npc=33214). Script for spawns like that would be really big :/)

ArtUrlWWW: never, because I using this GIT for my server :)

Qs can be realized by using quest_start_script table or by another ways.

Link to comment
Share on other sites

Wojta i don't know have you repaired loading of accessories but in update() must be InstallAllAccessories()

void Vehicle::Update(uint32 diff)
{
   Creature::Update(diff);    
  [b] InstallAllAccessories();[/b]
   if(despawn)
   {
       m_spawnduration -= diff;
       if(m_spawnduration < 0)
           Dismiss();
       despawn = false;
   }
}

Link to comment
Share on other sites

Hello. I download new source from original mangos repo and I try to pull dual-spec branch from the git://github.com/Tasssadar/Valhalla-Project.git

and I have many conflicts:

Auto-merging src/game/AggressorAI.cpp

Auto-merging src/game/BattleGroundMgr.cpp

Auto-merging src/game/CharacterHandler.cpp

CONFLICT (content): Merge conflict in src/game/CharacterHandler.cpp

Auto-merging src/game/Chat.cpp

Auto-merging src/game/Chat.h

Auto-merging src/game/ConfusedMovementGenerator.cpp

CONFLICT (content): Merge conflict in src/game/ConfusedMovementGenerator.cpp

Auto-merging src/game/Creature.cpp

CONFLICT (content): Merge conflict in src/game/Creature.cpp

Auto-merging src/game/Creature.h

CONFLICT (content): Merge conflict in src/game/Creature.h

Auto-merging src/game/CreatureEventAI.cpp

Auto-merging src/game/DBCStores.cpp

CONFLICT (content): Merge conflict in src/game/DBCStores.cpp

Auto-merging src/game/DBCStores.h

Auto-merging src/game/DBCStructure.h

Auto-merging src/game/DBCfmt.h

Auto-merging src/game/FleeingMovementGenerator.cpp

CONFLICT (content): Merge conflict in src/game/FleeingMovementGenerator.cpp

Auto-merging src/game/GameObject.cpp

Auto-merging src/game/GameObject.h

Auto-merging src/game/GridNotifiers.cpp

Auto-merging src/game/Group.h

Auto-merging src/game/GroupHandler.cpp

Auto-merging src/game/HomeMovementGenerator.cpp

CONFLICT (content): Merge conflict in src/game/HomeMovementGenerator.cpp

Auto-merging src/game/Level3.cpp

CONFLICT (content): Merge conflict in src/game/Level3.cpp

Auto-merging src/game/MiscHandler.cpp

Auto-merging src/game/MotionMaster.cpp

CONFLICT (content): Merge conflict in src/game/MotionMaster.cpp

Auto-merging src/game/MovementHandler.cpp

CONFLICT (content): Merge conflict in src/game/MovementHandler.cpp

Auto-merging src/game/Object.cpp

CONFLICT (content): Merge conflict in src/game/Object.cpp

Auto-merging src/game/Object.h

CONFLICT (content): Merge conflict in src/game/Object.h

Auto-merging src/game/ObjectMgr.cpp

Auto-merging src/game/ObjectMgr.h

Auto-merging src/game/Opcodes.cpp

CONFLICT (content): Merge conflict in src/game/Opcodes.cpp

Auto-merging src/game/Pet.cpp

Auto-merging src/game/Pet.h

Auto-merging src/game/PetHandler.cpp

Auto-merging src/game/Player.cpp

Auto-merging src/game/Player.h

CONFLICT (content): Merge conflict in src/game/Player.h

Auto-merging src/game/PointMovementGenerator.cpp

CONFLICT (content): Merge conflict in src/game/PointMovementGenerator.cpp

Auto-merging src/game/RandomMovementGenerator.cpp

CONFLICT (content): Merge conflict in src/game/RandomMovementGenerator.cpp

Auto-merging src/game/ReactorAI.cpp

Auto-merging src/game/SharedDefines.h

CONFLICT (content): Merge conflict in src/game/SharedDefines.h

Auto-merging src/game/Spell.cpp

CONFLICT (content): Merge conflict in src/game/Spell.cpp

Auto-merging src/game/Spell.h

CONFLICT (content): Merge conflict in src/game/Spell.h

Auto-merging src/game/SpellAuras.cpp

Auto-merging src/game/SpellEffects.cpp

CONFLICT (content): Merge conflict in src/game/SpellEffects.cpp

Auto-merging src/game/SpellHandler.cpp

CONFLICT (content): Merge conflict in src/game/SpellHandler.cpp

Auto-merging src/game/TargetedMovementGenerator.cpp

CONFLICT (content): Merge conflict in src/game/TargetedMovementGenerator.cpp

Auto-merging src/game/Unit.cpp

Auto-merging src/game/Unit.h

CONFLICT (content): Merge conflict in src/game/Unit.h

Auto-merging src/game/Vehicle.cpp

Auto-merging src/game/WaypointMovementGenerator.cpp

CONFLICT (content): Merge conflict in src/game/WaypointMovementGenerator.cpp

Auto-merging src/game/World.cpp

Auto-merging src/game/World.h

Auto-merging src/game/WorldSession.h

Auto-merging src/game/debugcmds.cpp

CONFLICT (content): Merge conflict in src/game/debugcmds.cpp

Auto-merging src/mangosd/mangosd.conf.dist.in

Auto-merging src/shared/Database/SQLStorage.cpp

CONFLICT (content): Merge conflict in src/shared/Database/SQLStorage.cpp

Auto-merging win/VC80/mangosd.vcproj

Automatic merge failed; fix conflicts and then commit the result.

How I can fix CONFLICT errors with my hands?

But vehicle branch pulled on original mangos correctly

Link to comment
Share on other sites

U can seat on tanks but its works nemnogo koryavo :D

in Ulduar vehicles operate so.

you can ride on them

you can shoot

but they have not filled with energy

I have implemented the power but I don't know how send info about energy to the client. May be with a SMSG_* or some thing else...

The Commit from my local repo:

--------------------------- src/game/DBCStructure.h ---------------------------
index 2e0ce90..a27acb4 100644
@@ -1663,7 +1663,7 @@ struct VehicleEntry
    uint32  m_uiLocomotionType;                             // 34
    float   m_msslTrgtImpactTexRadius;                      // 35
    uint32  m_uiSeatIndicatorType;                          // 36
-                                                            // 37, new in 3.1
+    uint32  m_powerType;                       // 37, new in 3.1
                                                            // 38, new in 3.1
                                                            // 39, new in 3.1
};

----------------------------- src/game/ObjectMgr.h -----------------------------
index d21bdd6..6dba638 100644
@@ -342,7 +342,7 @@ MANGOS_DLL_SPEC LanguageDesc const* GetLanguageDescByID(uint32 lang);

class PlayerDumpReader;
// vehicle system
-#define MAX_VEHICLE_SPELLS 10
+#define MAX_VEHICLE_SPELLS 6

struct VehicleDataStructure
{

----------------------------- src/game/Vehicle.cpp -----------------------------
index f80d26b..39fff88 100644
@@ -120,9 +121,41 @@ bool Vehicle::Create(uint32 guidlow, Map *map, uint32 phaseMask, uint32 Entry, u
    {
        ((InstanceMap*)map)->GetInstanceData()->OnCreatureCreate(this);
    }
+    if(Creature *cre = dynamic_cast<Creature*>(this))
+    {
+        if(m_vehicleInfo->m_powerType == POWER_STEAM)
+        {
+            this->setPowerType(POWER_ENERGY);
+            this->SetMaxPower(POWER_ENERGY, 100);
+        }
+        else if(m_vehicleInfo->m_powerType == POWER_PYRITE)
+        {
+            this->setPowerType(POWER_ENERGY);
+            this->SetMaxPower(POWER_ENERGY, 50);
+        }
+        else
+        {
+            for (uint32 i = 0; i < MAX_VEHICLE_SPELLS; ++i)
+            {
+                if(!cre->m_spells[i])
+                    continue;

-    InstallAllAccessories();
+                SpellEntry const *spellInfo = sSpellStore.LookupEntry(cre->m_spells[i]);
+                if(!spellInfo)
+                    continue;

+                if(spellInfo->powerType == POWER_MANA)
+                    break;
+
+                if(spellInfo->powerType == POWER_ENERGY)
+                {
+                    this->setPowerType(POWER_ENERGY);
+                    this->SetMaxPower(POWER_ENERGY, 100);
+                    break;
+                }
+            }
+        }
+    }
    return true;
}


------------------------------ src/game/Vehicle.h ------------------------------
index fadb9ea..dc81125 100644
@@ -41,6 +41,11 @@ enum VehicleSeatFlags
    SEAT_VEHICLE_FULL   = 0x08                              // seat occupied by vehicle and that vehicle is full too
};

+enum PowerType
+{
+    POWER_STEAM     = 61,
+    POWER_PYRITE    = 41,
+};
#define MAX_SEAT 8

typedef std::map<int8, VehicleSeat> SeatMap;

And about 2nd problem:

We need smbd to implement changing of seats between base vehicle and the accessories.

Added

Whence we receives the information for CustomVehicleFLags?

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